hassio-addons: πŸ› [MyElectricalData] Bad text encoding when using ingress view

Description

There is an issue with ingress view for MyElectricalData that doesn’t appear when connecting directly to the page. The issue is only with Firefox, not Chrominium based browers.

image

Reproduction steps

1. Go to the MyElectricalData ingress page with Firefox (any plateform)
2. The page has not the good encoding so all special characters are not well render.

Addon Logs

2023-07-23 10:37:15.912 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:37:15.958 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:37:15.959 -     INFO :  [XXXX] STATUT DU COMPTE.
2023-07-23 10:37:15.959 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:37:15.998 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:37:15.999 -     INFO :   FINISH
2023-07-23 10:37:16.000 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:37:16.048 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:37:16.049 -     INFO :  [XXXX] EXPORTATION DE DONNÉES DANS MQTT.
2023-07-23 10:37:16.049 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:37:16.050 -     INFO : GΓ©nΓ©ration des messages du contrat
2023-07-23 10:37:16.076 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:37:16.077 -     INFO :   FINISH
2023-07-23 10:37:16.077 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:37:16.127 -     INFO : GΓ©nΓ©ration des messages d'addresse
2023-07-23 10:37:16.154 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:37:16.155 -     INFO :   FINISH
2023-07-23 10:37:16.156 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:37:16.233 -     INFO : GΓ©nΓ©ration des donnΓ©es annuelles
2023-07-23 10:37:17.021 -     INFO : 127.0.0.1:54892 - "GET / HTTP/1.1" 200
2023-07-23 10:37:21.129 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:37:21.129 -     INFO :   FINISH
2023-07-23 10:37:21.130 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:37:21.184 -     INFO : Génération des données linéaires journalières.
2023-07-23 10:37:21.946 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:37:21.946 -     INFO :   FINISH
2023-07-23 10:37:21.947 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:37:21.996 -     INFO : GΓ©nΓ©ration des donnΓ©es annuelles dΓ©taillΓ©.
2023-07-23 10:37:22.634 -     INFO : 127.0.0.1:50692 - "GET / HTTP/1.1" 200
2023-07-23 10:37:27.995 -     INFO : 127.0.0.1:50700 - "GET / HTTP/1.1" 200
2023-07-23 10:37:33.447 -     INFO : 127.0.0.1:39884 - "GET / HTTP/1.1" 200
2023-07-23 10:37:38.849 -     INFO : 127.0.0.1:39892 - "GET / HTTP/1.1" 200
2023-07-23 10:37:44.335 -     INFO : 127.0.0.1:39692 - "GET / HTTP/1.1" 200
2023-07-23 10:37:49.812 -     INFO : 127.0.0.1:39706 - "GET / HTTP/1.1" 200
2023-07-23 10:37:54.821 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:37:54.822 -     INFO :   FINISH
2023-07-23 10:37:54.822 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:37:54.877 -     INFO : GΓ©nΓ©ration des donnΓ©es linΓ©aires dΓ©taillΓ©es
2023-07-23 10:37:55.251 -     INFO : 127.0.0.1:40358 - "GET / HTTP/1.1" 200
2023-07-23 10:38:00.823 -     INFO : 127.0.0.1:48850 - "GET / HTTP/1.1" 200
2023-07-23 10:38:06.717 -     INFO : 127.0.0.1:48852 - "GET / HTTP/1.1" 200
2023-07-23 10:38:08.458 -     INFO :  => Finish
2023-07-23 10:38:08.509 -     INFO : Génération des données de puissance max journalières.
2023-07-23 10:38:08.649 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:38:08.650 -     INFO :   EXPORT TERMINÉ
2023-07-23 10:38:08.650 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:38:08.651 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:38:08.652 -     INFO :   EXPORTATION HOME ASSISTANT
2023-07-23 10:38:08.652 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:38:08.707 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:38:08.708 -     INFO :  [XXXX] EXPORTATION DES DONNÉES DANS HOME ASSISTANT (VIA MQTT)
2023-07-23 10:38:08.708 -     INFO : ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ β—¦ ❖ β—¦ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2023-07-23 10:38:08.822 -     INFO : current_week
2023-07-23 10:38:08.850 -     INFO :  75085
2023-07-23 10:38:08.851 -     INFO : last_week
2023-07-23 10:38:08.874 -     INFO :  99127
2023-07-23 10:38:08.875 -     INFO : current_week_last_year
2023-07-23 10:38:08.899 -     INFO :  30715
2023-07-23 10:38:08.900 -     INFO : last_month
2023-07-23 10:38:08.925 -     INFO :  => 201434
2023-07-23 10:38:08.926 -     INFO : current_month
2023-07-23 10:38:08.950 -     INFO :  => 226549
2023-07-23 10:38:08.951 -     INFO : current_month_last_year
2023-07-23 10:38:08.976 -     INFO :  => 43506
2023-07-23 10:38:08.977 -     INFO : last_month_last_year
2023-07-23 10:38:09.003 -     INFO :  => 0
2023-07-23 10:38:09.003 -     INFO : current_year
2023-07-23 10:38:09.046 -     INFO :  => 1576510
2023-07-23 10:38:09.046 -     INFO : current_year_last_year
2023-07-23 10:38:09.090 -     INFO :  => 43506
2023-07-23 10:38:09.091 -     INFO : last_year
2023-07-23 10:38:09.117 -     INFO :  => 0
2023-07-23 10:38:09.117 -     INFO : yesterday_hp / yesterday_hc
2023-07-23 10:38:09.200 -     INFO :  => HC : 1698.0
2023-07-23 10:38:09.201 -     INFO :  => HP : 2845.0
2023-07-23 10:38:09.201 -     INFO : peak_offpeak_percent_hp VS peak_offpeak_percent_hc
2023-07-23 10:38:12.263 -     INFO :  => 44.6407595711012
2023-07-23 10:38:12.264 -     INFO : current_week_evolution
2023-07-23 10:38:12.264 -     INFO :  -24.253735107488367
2023-07-23 10:38:12.265 -     INFO : current_month_evolution
2023-07-23 10:38:12.265 -     INFO :  => 420.730473957615
2023-07-23 10:38:12.266 -     INFO : yesterday_evolution
2023-07-23 10:38:12.266 -     INFO : yesterday
2023-07-23 10:38:12.311 -     INFO :  4543
2023-07-23 10:38:12.311 -     INFO : yesterday_1
2023-07-23 10:38:12.340 -     INFO : 127.0.0.1:43416 - "GET / HTTP/1.1" 200
2023-07-23 10:38:12.346 -     INFO :  11530
2023-07-23 10:38:12.348 -     INFO :  -60.59843885516045
2023-07-23 10:38:12.348 -     INFO : monthly_evolution
2023-07-23 10:38:12.350 -     INFO : last_month
2023-07-23 10:38:12.381 -     INFO :  => 402868
2023-07-23 10:38:12.382 -     INFO : last_month_last_year
2023-07-23 10:38:12.408 -     INFO :  => 0
2023-07-23 10:38:12.409 -     INFO :  => 0
2023-07-23 10:38:12.409 -     INFO : yearly_evolution
2023-07-23 10:38:12.410 -     INFO : current_year
2023-07-23 10:38:12.454 -     INFO :  => 3153020
2023-07-23 10:38:12.454 -     INFO : current_year_last_year
2023-07-23 10:38:12.497 -     INFO :  => 87012
2023-07-23 10:38:12.498 -     INFO :  => 0

Architecture

armv7

OS

HAos

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 17 (13 by maintainers)

Commits related to this issue

Most upvoted comments

Yes we can

The latest version is now OK for me. Thank you.

Please let me know if the latest version works

Tu est sur quelle version ? 0.9.0 ? Si oui normal, il y a un bug quand tu disable MQTT πŸ˜•

Le plus simple est de tester sur la 0.9.1-beta9.

Try with this config.yaml file :

debug: true
tempo:
  enable: false
home_assistant:
  enable: false
influxdb:
  enable: false
mqtt:
  enable: false
myelectricaldata:
  "MON_PDL_1":
    enable: 'true'
    token: TOKEN_DE_MON_PDL_1
    name: "Maison"
    addresses: 'true'
    cache: 'true'
    consumption: 'true'
    consumption_detail: 'true'
    consumption_price_base: '0.145907'
    consumption_price_hc: '0.124364'
    consumption_price_hp: '0.164915'
    consumption_max_date: "2021-06-01"
    consumption_detail_max_date: "2021-06-01"
    offpeak_hours_0: 22H00-6H00               # LUNDI
    offpeak_hours_1: 22H00-6H00               # MARDI
    offpeak_hours_2: 22H00-6H00               # MERCREDI
    offpeak_hours_3: 22H00-6H00               # JEUDI
    offpeak_hours_4: 22H00-6H00               # VENDREDI
    offpeak_hours_5: 22H00-6H00;12H00-14H00   # SAMEDI
    offpeak_hours_6: 22H00-6H00;12H00-14H00   # DIMANCHE
    plan: HC/HP
    production: 'false'
    production_detail: 'false'
    production_price: '0.0'
    production_max_date: "2021-06-01"
    production_detail_max_date: "2021-06-01"
    refresh_addresse: 'false'
    refresh_contract: 'false'

With 0.9.0 i have migrate to framework FastAPI, it’s possible encoding have change. I check on it.

Hi, now that is quite strange. @m4dm4rtig4n are all characters encoding UTF-8 ?

I’ll try to duplicate