Dear Forum
I im having a hard time to get this custom entity working. Just new to HA and no coding experience.
I have made this code and put in my configuration.yaml to create a new entity that tracks daily costs of electricity.
template:
- sensor:
- name: “Nydaglig pris”
unique_id: “dagligpris”
state: >
{{ states(‘sensor.elmaler_energy_daily’) * states(‘sensor.energi_data_service’) }}
- name: “Nydaglig pris”
No error from studio code server, and the sensor show up under entities.
But the data is unavalible for some reason.
Energi data service current electricity price in DKK (Updates hourly) and sensor_elmaler_daily is daily consumtion in kWh.
Please send help.