Hi,
I’m using the myenedis integration from HACS in order to replace the Linky integration. With this, I have a sensor with all the different informations like before.
I want to get the daily value using the utility meter in order to have the values for each day (and put everything in a graph) using recorder.
I managed to make the sensor template and for me it works since I have the value in the dev tools:
- platform: template
sensors:
daily_power_enedis:
friendly_name: "Conso journalière Enedis"
unit_of_measurement: 'kWh'
value_template: "{{ (state_attr('sensor.myenedis_14851953566977', 'day_1') /1000) | float | round(2)}}"
Now I’m trying to use this sensor in the utility meter :
daily_power_enedis:
source: sensor.daily_power_enedis
cycle: daily
tariffs:
- peak
The value of the sensor that I’m using are:
attribution: ''
lastSynchro: '2020-12-02T13:59:27.405220'
lastUpdate: '2020-12-02T13:59:27.405211'
timeLastCall: '2020-12-02T13:59:27.405077'
yesterday: 17684
last_week: 113305
day_1: 17684
...
When launching everything, here is the error that I have:
Error adding entities for domain sensor with platform utility_meter
Error while setting up utility_meter platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 316, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 530, in add_to_platform_finish
await self.async_added_to_hass()
File "/usr/src/homeassistant/homeassistant/components/utility_meter/sensor.py", line 264, in async_added_to_hass
self._state = Decimal(state.state)
decimal.InvalidOperation: [<class 'decimal.ConversionSyntax'>]
I’m not sure how I can check if the value is a decimal, since in the dev tools I can see that the operation works since I have the correct values.
Anyone can help me out?
Thanks all!