Closed angeeinstein closed 6 months ago
Same problem for me - it works as intended when using spot data price. Would love to know how to use the net price sensor too.
The temporary solution is to add a template sensor which converts ct/kWh from the net-price sensor into EUR/kWh. The long-term solution is more complicated: Either I have to make the unit-of-measure configurable or the HA unit-of-measure system can be enhanced to convert between different energy prices.
Same issue here, I'll check out the template. Maybe just simply duplicating the sensor with a different unit would be an option as a quick fix without unit configuration?
Example:
{{ states('sensor.epex_spot_data_net_price') | float / 100 }}
Got a working template now - I've tried the helper but it complained about missing device class / unit. Adding this template directly to configuration.yaml works fine for me (omit template/sensor if you've got that section already obviously):
template:
sensor:
- name: "Energy Net Price"
state: "{{(states('sensor.epex_spot_data_net_price') | float / 100) }}"
unit_of_measurement: "EUR/kWh"
state_class: measurement
thank you, both methods work perfectly!
@mampfes Was there an action/issue/defect/feature on Home Assistant side in regard to unit conversion, or will that be the future solution to create this template sensor?
@gismo2004 No, not yet.
Having the price in ct seems to be a problem for Home Assistant. The calculation for the daily electricity cost is way too high when I select Net price as an entity for cost calculation. How does it work for other people?