Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NetMeterSensor' object has no attribute 'friendly_name' #35

Open
ostracizado opened this issue Jan 28, 2024 · 4 comments

Comments

@ostracizado
Copy link

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/erse/sensor.py:305
Integration: Entidade Reguladora dos Serviços Energéticos (documentation, issues)
First occurred: 27 January 2024 at 00:00:00 (97 occurrences)
Last logged: 00:00:00

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/erse/sensor.py", line 305, in timer_update
    self.friendly_name,
    ^^^^^^^^^^^^^^^^^^
AttributeError: 'NetMeterSensor' object has no attribute 'friendly_name'
@dgomes
Copy link
Owner

dgomes commented Jan 28, 2024

Podes partilhar a tua configuração ?

@ostracizado
Copy link
Author

Não estou a conseguir replicar o erro; mas suspeito estar relacionado com um utility_sensor que configurei pelo helpers GUI, recentemente, para fazer reset a 26 de cada mês.

Há alguma forma de visualizar a configuração em estilo yaml de tais configurações GUI?

@dgomes
Copy link
Owner

dgomes commented Jan 28, 2024

não... as mesmas ficam num json na pasta /config/.storage/core.config_entries

@cmgestevao
Copy link

cmgestevao commented Sep 5, 2024

Este erro teve origem numa integração personalizada.

Logger: homeassistant
Origem: custom_components/erse/sensor.py:304
integração: Entidade Reguladora dos Serviços Energéticos (documentação, problemas)
Primeira ocorrência: 00:00:01 (90 ocorrências)
Último registo: 22:15:00

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/config/custom_components/erse/sensor.py", line 304, in timer_update
self.friendly_name,
^^^^^^^^^^^^^^^^^^
AttributeError: 'NetMeterSensor' object has no attribute 'friendly_name'

Olá, de 15 em 15 minutos sai isto no log. Se reiniciar o HA deixa de aparecer, mas a partir das 00:00:00 volta a aparecer de 15 em 15 minutos.

No ficheiro "core.config_entries" referido anteriormente, o que encontro é o que está aqui!

 {
    "created_at": "1970-01-01T00:00:00+00:00",
    "data": {
      "operator": "EZU",
      "installed_power": 4.6,
      "plan": "Simples",
      "cycle": "Ciclo Diário",
      "export_meter": "sensor.ebox_export_diaria",
      "power_cost": 0.2257,
      "NORMAL": 0.125,
      "NORMAL meter": [
        "sensor.ebox_import_diaria",
        "sensor.ebox_import_mensal",
        "sensor.ebox_import_mensal_ft"
      ]
    },
    "disabled_by": null,
    "domain": "erse",
    "entry_id": "df512d666bbd2aef715e0445bef2b4b5",
    "minor_version": 1,
    "modified_at": "1970-01-01T00:00:00+00:00",
    "options": {
      "power_cost": 0.3186,
      "NORMAL": 0.155
    },
    "pref_disable_new_entities": false,
    "pref_disable_polling": false,
    "source": "user",
    "title": "EZU - 4.6 kVA - Simples Ciclo Diário",
    "unique_id": null,
    "version": 1
  },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants