Open JensenNick opened 2 months ago
This issue persists although this time it was my utility_meters based on sensor.energy_yield_total_ts
that behaved. This behaviour is after I did some "development-work" on my running instance og HA. It has been running stable since July.
I'm now testing if this correction will prevent the issue... "float(0)" changes to "float" for sensors with availability and an if-rule for sensor.energy_yield_2_ts. The challenge here is to incorporate a value for the 2nd inverter in those use-cases with only one inverter and not to have the sensor reset to "0".
## ----------------------------------
## Huawei Solar PEES - Energy Sensors
- name: "Energy Yield #1 (ts)"
unique_id: energy_yield_1_ts
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
state: >
{{ states('sensor.energy_yield_1') | float }}
availability: >
{{ has_value('sensor.energy_yield_1') }}
- name: "Energy Yield #2 (ts)"
unique_id: energy_yield_2_ts
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
state: >
{% if has_value('sensor.energy_yield_2') %}
{{ states('sensor.energy_yield_2') | float }}
{% else %}
{{ 0 }}
{% endif %}
- name: "Energy Yield Total (ts)"
unique_id: energy_yield_total_ts
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
state: >
{{ states('sensor.energy_yield_1') | float +
states('sensor.energy_yield_2') | float }}
availability: >
{{ has_value('sensor.energy_yield_1') and
has_value('sensor.energy_yield_2') }}
Additionally I'm considering the option to ad periodically_resetting: false
to some/all utility meters. I'd appreciate any input on the issue. Here is what "Claude" has to say...
For testing I've added periodically_resetting: false
to all Energy Utility Meters without a cycle, but according to Claud this should maybe be done to all utility meters.
sensor.energy_battery_charge
sensor.energy_battery_charge_grid
sensor.energy_battery_charge_yield
sensor.energy_battery_discharge
sensor.energy_battery_discharge_grid
sensor.energy_battery_discharge_house
sensor.energy_import
sensor.energy_export
sensor.energy_export_yield
sensor.energy_house_load
sensor.energy_house_load_grid
sensor.energy_yield_1
sensor.energy_yield_2
sensor.energy_yield_total
Under certain circumstances (which I still haven't identified) the ultility meters
sensor.economy_nri_pv
andsensor.economy_nri_battery
introduce a significant "jump" in value. This also includes the related sensors with a cycle but not the (ts) input sensor.and
My time to update/support/investigate is limited at the moment, but it could be one of the settings of the utility meter which is wrong/missing https://www.home-assistant.io/integrations/utility_meter/