Git Product home page Git Product logo

ha_erse's Introduction

ha_erse

Home Assistant Custom Component for ERSE (Entidade Reguladora dos Serviços Energéticos)

This component provides the current tariff of a given electricity operator as well as a simulation of the costs associated.

This components is for energy clients in Portugal, and fully automates the transitions of tariffs of a utility_meter.

Configuration

Go to Settings >> Devices & Services in the UI. Click the button with + sign on the integrations page and from the list of integrations, select ERSE.

Type in your Energy Provider (EDP, GALP, Iberdrola), Power installed and the tariff plan and cycle (default is Ciclo Diário).

Then select which utility_meters are running through this electricity plan (this is optional and is only necessary to automate tariff change of the utility_meter)

Finally you must type in the cost in Euros of power availability and tariffs (Euro/kWh) as well as the entities that track each tariff.

Important

Your utility_meter must have the proper tarifs:

  • Bi-Horário: Vazio e Fora de Vazio
  • Tri-Horário: Vazio, Ponta e Cheias

That is it!

Example utility_meter configuration

utility_meter:            
  daily_energy:                         
    source: sensor.energia_rede_importada
    cycle: daily                       
    tariffs:
      - Fora de Vazio
      - Vazio 
  monthly_energy:
    source: sensor.energia_rede_importada
    cycle: monthly
    tariffs:        
      - Fora de Vazio                                        
      - Vazio        
    offset:           
      days: 20           

For more information go the utility meter help page

Help

Join me at CPHA Discord

ha_erse's People

Contributors

dgomes avatar helderfmf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ha_erse's Issues

EDP e GALP only

Viva Duarte,

Quando adiciono a integração ERSE via Integrations Page no HA apenas tenho a opção de selecionar a GALP e a EDP, não me aparecem a Iberdrola e a GoldEnergy.
image

Error setting up entry goldenergy_bi_horario_ciclo_diario for erse

Bom dia

Tenho um erro a carregar esta integração, e nos logs esta é a informação que tenho:

Logger: homeassistant.config_entries
Source: custom_components/erse/init.py:36
Integration: Entidade Reguladora dos Serviços Energéticos (documentation, issues)
First occurred: 12:37:51 (1 occurrences)
Last logged: 12:37:51

Error setting up entry goldenergy_bi_horario_ciclo_diario for erse
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 293, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/config/custom_components/erse/init.py", line 36, in async_setup_entry
entry.data[CONF_INSTALLED_POWER],
KeyError: 'installed_power'

Tenho:
Versão: HA core-2021.8.6
Versão do Supervisor | supervisor-2021.06.8

Integration is using deprecated `DEVICE_CLASS_*` constants

This custom integration uses deprecated DEVICE_CLASS_* constants in its codebase.

The DEVICE_CLASS_* constants have been deprecated and replaced in Home Assistant Core 2021.12 (over a year ago). I would highly suggest updating/migrating this integration to the new enums.

For example, for the device classes supported by the sensor platform, there is now a SensorDeviceClass enum. So if a sensor previously used the DEVICE_CLASS_ENERGY constant, it should now use SensorDeviceClass.ENERGY. Other platforms (like binary_sensor, and number) provide similar enumerations for their supported device classes.

The migration thus only consists of replacing constants with an enumeration member and is, therefore, very low impact and should be fairly straightforward.

If I can help resolve any questions regarding this change or migration, feel free to ask or respond to this issue. I'm happy to help!

Kindest regards,

../Frenck

Erro ao adicionar integração

Ao tentar adicionar a integração demora bastante tempo a processar e depois dá este erro:

O fluxo de configuração não pôde ser carregado: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style>body{font-family:Arial,Helvetica,sans-serif;font-size:12px;text-align:center}h1{color:#06C;font-size:25px;line-height:60px;margin-top:56px}img{margin-top:40px} </style> </head> <body> <img src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQECAQEB AQEBAgICAgICAgICAgICAgICAgICAgICAgICAgICAgL/2wBDAQEBAQEBAQICAgICAgICAgICAgIC AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgL/wAARCAAzAMg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4 5mbK9OrLkollyRUoJYyzkveDWpwE03impfqHoRqyRIUPYpQAA4CVHJW5NXLEe40i81T+nuNLrkiI lmzuNmsju7jkxgzdIJkXQcpVXIEnJRHeQ/1kOLATEMAGKICAdAteFYMU2IRZGbQkYRn6AkcVuiVg RiVAG5WRWgB4wSBP6AT7ezs+np09uAp44a5MnLCfc5jOVNf6g48kKNUYFvkCu4/kZa9v8eRtneM2 cqusWgPJY8Moz86qgkilmSkUkQ3hSZERAqYBcPj2DGJZMoqLZNI2MjWjePjo1g3RZsI9gyQK3Zsm TNuBU0kkkylImmQpSEIAFKAAABwHm8AcB//Z "/> <h1 id="a"></h1> <hr> <p>&copy; 2021 <a href="http://www.synology.com">Synology Inc.</a></p> </body> <script type ="text/javascript"> /* Copyright (c) 2021 Synology Inc. All rights reserved. */ (function(){var a={en:"Sorry, the page you are looking for is not found.",zh:"\u62b1\u6b49\uff0c\u60a8\u6240\u6307\u5b9a\u7684\u9875\u9762\u4e0d\u5b58\u5728\u3002",it:"La pagina richiesta non \u00e8 stata trovata.","zh-HK":"\u62b1\u6b49\uff0c\u60a8\u6240\u6307\u5b9a\u7684\u9801\u9762\u4e0d\u5b58\u5728\u3002",cs:"Hledan\u00e1 str\u00e1nka nebyla nalezena.",es:"Lo sentimos, no se encuentra la p\u00e1gina que est\u00e1 buscando.",ru:"\u0418\u0437\u0432\u0438\u043d\u0438\u0442\u0435, \u0438\u0441\u043a\u043e\u043c\u0430\u044f \u0432\u0430\u043c\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430.",nl:"Sorry, de pagina die u zoekt kan niet weergegeven worden.",pt:"Desculpe, a p\u00e1gina que procura n\u00e3o foi encontrada.",no:"Beklager, siden du leter etter finnes ikke.",nb:"Beklager, siden du leter etter finnes ikke.",tr:"\u00dczg\u00fcn\u00fcz, arad\u0131\u011f\u0131n\u0131z sayfa bulunamad\u0131.",pl:"Przepraszamy, nie znaleziono strony, kt\u00f3rej szukasz.",fr:"D\u00e9sol\u00e9, la page que vous recherchez est introuvable.",de:"Es tut uns Leid, die von Ihnen gesuchte Seite konnte nicht gefunden werden.",da:"Desv\u00e6rre, den side, du leder efter, kunne ikke findes.","pt-BR":"Desculpe, a p\u00e1gina que procura n\u00e3o foi encontrada.","zh-MO":"\u62b1\u6b49\uff0c\u60a8\u6240\u6307\u5b9a\u7684\u9801\u9762\u4e0d\u5b58\u5728\u3002",hu:"Eln\u00e9z\u00e9st, a keresett oldal nem tal\u00e1lhat\u00f3.",ja:"\u7533\u3057\u8a33\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u635c\u3057\u3066\u3044\u308b\u30da\u30fc\u30b8\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093",nn:"Beklager, siden du leter etter finnes ikke.","zh-TW":"\u62b1\u6b49\uff0c\u60a8\u6240\u6307\u5b9a\u7684\u9801\u9762\u4e0d\u5b58\u5728\u3002",ko:"\uc8c4\uc1a1\ud569\ub2c8\ub2e4. \ucc3e\uace0\uc790 \ud558\ub294 \ud398\uc774\uc9c0\ub97c \ubc1c\uacac\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4.",sv:"Sidan du s\u00f6ker hittades inte."};var b=window.navigator.browserLanguage||window.navigator.language;if(-1==["zh-TW","zh-MO","zh-HK","pt-BR"].indexOf(b)){b=b.split("-",1)}document.getElementById("a").innerHTML=a[b]||a.en})(); </script> </html>

Feature Request: Redefine utility_meters and tariff sensors

Ability to redefine utilitty-meters and tariff sensors in integration configuration without having to delete and create everything again. For those who have more than 20 devices (I have more than 100), having to redefine 3 utility meters for each device and 3 sensors x 3 for each tariff is an Impossible task. Each time I add a new device I have to redo everything....Thanks for this great integration!!! Should be official.

Adding Integration results in error

Going to Integrations > + > "Entidade Reguladora..." results in a "Config Flow could not be loaded".

Request: http://x.x.x.x:8123/api/config/config_entries/flow

HTTP/1.1 500 Internal Server Error
Date: Thu, 05 Aug 2021 17:42:34 GMT
Content-Type: text/plain; charset=utf-8
Connection: close
Content-Length: 55
Server: Python/3.9 aiohttp/3.7.4.post0

At the time of writing, both Home Assistant and your integration (via HACS) are up to date. Let me know if I can test anything to help.

Inserir 0 à direita de um número nas tarifas

Não é possível inserir 0 à direita de um número nas tarifas (cheia, ponta, vazio) da integração ERSE.
Tenho que escrever um número qualquer, mudar o cursor para antes desse número e então inserir o 0.
Por exemplo 0.101, não se consegue escrever sem ser primeiro 0.11 e depois mover o cursor e colocar o 0 no meio dos 1

Error occurred while loading the configuration flow for erse integration

Good morning,

After having everything working, in full by coincidence with an update of the new version of the home assistant, my tariff / entity from ERSE - EDP bi-horário -went to a restored state with an unknown result. Upon entering the entity he said that the entity had been orphaned.

Not knowing what to do, and thinking about adding a new tariff, I deleted this entity. However, I realized that I could mot add new tariff, so I decided to delete the integration and re-install it.

After that, I have continuously tried to install the integration, but without success, this message always appears: from error ‘‘ the flow of information could not be loaded ’

Clicking again on adding integrations I get the following message: ‘‘ please wait while the integration is loading ’’ ’.

It stays in this state for hours.

However, I uninstalled ERSE at Hacs and installed it again. I checked in the editor file if everything was ok (custom component) and tried to install the application again, but without success, again giving the same error message and returning, after insisting, to give another message that the integration is being installed.

Checking the error, the following information is found:

Logger: homeassistant.config_entries
Source: config_entries.py Recomend75
First Time: 3:35:40 (2 occurrences)
Last record: 8:53:23

An error occurred while loading the configuration flow for erse integration: it is not possible to import the name ‘Operators’ from ‘electricity.tariffs’ (/usr/local/lib/python3.8/site-packages/electricity/tariffs.py)

Please, give me some help...I'm newer in HA....

No 'version' key in the manifest file for custom integration 'erse'.

Since lastest version of HA+ (2021.3.4) that i'm getting this warning:

hass | 2021-03-24 17:16:58 WARNING (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'erse'. This will not be allowed in a future version of Home Assistant. Please report this to the maintainer of 'erse'

When will this be available so that on a future upgrade of HA the erse integration wont stop working?

Regards, Bruno

Log warning 2027.7 async_forward_entry_setup deprecated

With HA 2024.7.1 there is a warning in the log:
2024-07-08 13:25:38.212 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'erse' calls async_forward_entry_setup for integration, erse with title: EDP Comercial - 17.25 kVA - Bi-Horária Ciclo Diário and entry_id: 2ee46ab90fc7e9b3a8843a0724883d78, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/erse/__init__.py, line 105: hass.async_create_task(, please create a bug report at https://github.com/dgomes/ha_erse/issues
This is not urgent and it just to inform the developper and the community avoiding future issues related with the same topic.
Thank you.

Feature Request: Sum of all tariffs and costs for each cycle (utility_meter)

Automatically create 2 more sensors, for each utility_meter:

  • Sum of energy of all tariffs
  • Sum of cost for all tariffs

Then it would be possible to have, automatically, without doing templates: daily / monthly consuptions and costs, derived from the sum of the tariffs for each cycle.
I think this would improve a lot this integration, because everyone that uses it the right way will have to always do this template sensors "by hand".
Thanks again :)

O sensor não é mostrado para escolher quando estou a colocar a tarifa e o sensor de vazio e fora de vazio

Já fiz a atualização para a última versão, apaguei todas as entidades.
Algumas entidades não estão disponíveis para escolha quando estou a escolher o sensor para vazio e para fora de vazio.
Essas mesmas entidades existem, foram criadas, e aparentemente não têm erro.
Normalmente tenho 3 integrações ERSE:

  1. EDP - Ciclo Diário - Bi-horário
  2. EDP - Ciclo Semanal - Bi-horário
  3. CASA - Ciclo Semanal - Bi-horário (serve para medir o que de facto consumo em casa, como tenho solar, serve para comparar com o que vou comprar à EDP)
    Consegui criar as duas primeiras, sem problema. A terceira não, devido a não estarem disponiveis os respectivos meteres para escolha.
    Existe alguma limitação em termos da integração que deva atender?
    NOTA: Esteve a funcionar anteriormente.
    Obrigado

Error in LOG after upgrading to the latest version

Upgrade done using HACS teh Delete the old configuration and create a new one.
HA version: 2023.9.2
ERSE Version 2.2.0

Log error
2023-09-22 23:49:12.080 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up erse platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/erse/sensor.py", line 79, in async_setup_entry TariffCost(hass, config_entry.entry_id, tariff, meter_entity) File "/config/custom_components/erse/sensor.py", line 419, in __init__ self._attr_name = hass.states.get(meter_entity).attributes.get("friendly_name") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'attributes'

The entities were created

image

But after a HA restart, they are no longer available:

image

And then with a reload they seem to be available again:

image

Thank you for this awesome component!

From self.async_update_ha_state() to self.async_write_ha_state()

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:705
First occurred: 13:41:25 (1 occurrences)
Last logged: 13:41:25

Entity sensor.edp_4_6_kva_bi_horaria_ciclo_semanal (<class 'custom_components.erse.sensor.EletricityEntity'>) is using self.async_update_ha_state(), without enabling force_update. Instead it should use self.async_write_ha_state(), please report it to the custom integration author.

Error after upgrading to 2021.8.0

2021-08-04 12:26:33 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform erse

Traceback (most recent call last):


  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities


    await asyncio.gather(*tasks)


  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 587, in _async_add_entity


    await entity.add_to_platform_finish()


  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 710, in add_to_platform_finish


    await self.async_added_to_hass()


  File "/config/custom_components/erse/sensor.py", line 202, in async_added_to_hass


    self._update_cost()


  File "/config/custom_components/erse/sensor.py", line 184, in _update_cost


    energy_state.attributes[ATTR_LAST_RESET]


AttributeError: 'NoneType' object has no attribute 'attributes'


2021-08-04 12:26:33 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up erse platform for sensor


Traceback (most recent call last):


  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 257, in _async_setup_platform


    await asyncio.gather(*pending)


  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities


    await asyncio.gather(*tasks)


  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 587, in _async_add_entity


    await entity.add_to_platform_finish()


  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 710, in add_to_platform_finish


    await self.async_added_to_hass()


  File "/config/custom_components/erse/sensor.py", line 202, in async_added_to_hass


    self._update_cost()


  File "/config/custom_components/erse/sensor.py", line 184, in _update_cost


    energy_state.attributes[ATTR_LAST_RESET]


AttributeError: 'NoneType' object has no attribute 'attributes'

How to use with wibeee?

Hello and congratulations for your work.

I'm using Wibeee and the entity providing power is a sensor.

When installing the component, I can select the provider and tarif (in my case Galp Simples) but I can't select nothing on the third drop-down box.

I imagine the component should be available with this:

electricity:
  utility_galp:
    country: Portugal
    operator: Galp
    plan: Simples

utility_meter:
  energia_mensal:
    source: sensor.wibeee_phase4_active_energy
    cycle: montly
    tariffs: Simples

Is this correct?

Why can't I select nothing on the third drop-down box?

Adicionar novo Operador dos Açores

Boas, sou dos açores, lá temos apenas a EDA como fornecedor de electricidade.
Depois de alguma pesquisa deparei-me com este projecto, que me parece muito interessante e funcional.

E gostava de saber se seria possível, inserir este tarifário trihorario que acaba por ser um bocado complicado pk sábado e domingo é diferente do resto da semana e o ano está dividido em 2 partes com alterações nas horas.

Screenshot_20211003-232813_2

Caso não seja possível, compreendo e fico agradecido na mesma :)

Obrigado pela atenção

State class warning

With the Home Assistant 2023.3.1 all the ERSE Sensors need to change the State Class as per the log bellow:

2023-03-05 21:42:32.805 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.edp_17_25_kva_bi_horaria_ciclo_diario_cost (<class 'custom_components.erse.sensor.FixedCost'>) is using state class 'total_increasing' which is impossible considering device class ('monetary') it is using; expected None or one of 'total'; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author. 2023-03-05 21:42:32.806 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.sensor_han_monthly_total_energy_consumed_vazio_cost (<class 'custom_components.erse.sensor.TariffCost'>) is using state class 'total_increasing' which is impossible considering device class ('monetary') it is using; expected None or one of 'total'; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author. 2023-03-05 21:42:32.807 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.sensor_han_monthly_total_energy_consumed_fora_de_vazio_cost (<class 'custom_components.erse.sensor.TariffCost'>) is using state class 'total_increasing' which is impossible considering device class ('monetary') it is using; expected None or one of 'total'; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author. 2023-03-05 21:42:32.808 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.edp_comercial_17_25_kva_bi_horaria_ciclo_diario_cost (<class 'custom_components.erse.sensor.FixedCost'>) is using state class 'total_increasing' which is impossible considering device class ('monetary') it is using; expected None or one of 'total'; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration

Integração não aparece disponível para adicionar

Boas.

Copiei a pasta erse para a /custom_components e reiniciei.

Tenho a tipica mensagem "2021-09-04 15:07:40 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration erse which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant" pelo que sei que a integração foi carregada.

Mas depois em Integrations - Add Integrations quando procuro por ela não aparece nada.

so consigo uma entidade na integração

Boa tarde
Depois de realizar a atualização da integração ERSE, so me cria uma entidade na primeira integração de cada utility_meter, o que leva a que só aquele componente mude a tarifa.
Pode por favor ajudar-me nesta situação?
Muito Obrigado

Log Error with HA 2023.5.4

With the version 2023.5.4 this error pops up evrytime teh HA is started

`2023-06-13 13:42:09.009 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.edp_comercial_17_25_kva_bi_horaria_ciclo_diario (<class 'custom_components.erse.sensor.EletricityEntity'>) is using self.async_update_ha_state(), without enabling force_update. Instead it should use self.async_write_ha_state(), please report it to the custom integration author.
2023-06-13 13:42:09.231 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 579, in state
numerical_value = int(value)
ValueError: invalid literal for int() with base 10: 'unknown'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template_entity.py", line 379, in _async_template_startup
result_info.async_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 953, in async_refresh
self._refresh(None)
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1133, in _refresh
self.hass.async_run_hass_job(self._job, event, updates)
File "/usr/src/homeassistant/homeassistant/core.py", line 607, in async_run_hass_job
hassjob.target(*args)
File "/usr/src/homeassistant/homeassistant/helpers/template_entity.py", line 348, in _handle_results
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 583, in state
raise ValueError(
`

Can't set prices

I'm on HASS 2021.10.5 and installed ERSE through HACS. When I get to the step of inputting prices, I can't type: 0.098.

Screenshot 2021-10-16 at 22 39 09

The input fields don't accept leading zeroes.

Arredondamento de casas decimais

Após atualização do HA passei a não ter arredondamento das casas decimais e o "Round" não é aceite na configuração. Como poderei definir o máximo de casas decimais?
Obrigado.

SensorStateClass.TOTAL_INCREASING valid for SensorDeviceClass.MONETARY

Problema com o sensor "cost" tem a classe de "total_increasing" quando deveria ter "total".

Entity sensor.sensor_consumo_real_diario_tri_horario_cheias_cost (<class 'custom_components.erse.sensor.TariffCost'>) is using state class 'total_increasing' which is impossible considering device class ('monetary') it is using; expected None or one of 'total'; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

Já está identificado também no "Core" do HASS
https://github.com/home-assistant/core/issues/88457

Alterei manualmente as entidades no "Developer Tools" de total_increasing para total e dei reboot o erro desapareceu.

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

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'

mais info

Ola, existe mais informação de como usar este componente em algum lado?

não consigo passar deste erro:

Invalid config for [sensor.erse]: [utility_meters] is an invalid option for [sensor.erse]. Check: sensor.erse->utility_meters. (See ?, line ?).

configuration.yaml

utility_meter:
    energia_diario_consumed:
        source: sensor.energy_consumed
        cycle: daily
        tariffs:
            -  Fora de Vazio
            -  Vazio
    energia_mensal_consumed:
        source: sensor.energy_consumed
        cycle: monthly
        tariffs:
            - Fora de Vazio
            - Vazio
            
sensor:
     - platform: erse
       operator: EDP
       plan: Tri-horário - ciclo diário
       utility_meters:
           - utility_meter.totalizador

estou a usar os sensores da Efergy

[home] is an invalid option for [erse].

Hey could you help me set this up, i don't know what i'm doing wrong:

erse:
  home:
    operator: EDP
    plan: Simples
    utility_meters:
    - utility_meter.totalizador

Thanks for your work

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.