-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
HI,
First off thanks for creating this integration i will try to use this to track the energy peak cost from our grid company.
But i noticed that configuring this through yaml isn't working but the ui does. It says that it expects a dictionary and not a list which is provided in the documentation. However when i tried to change to a dictionary structure it failed. Am i doing something wrong? :)
This is what i tried:
---
template:
- sensor:
- name: "Power Tracking Grid Sensor"
icon: mdi:transmission-tower-import
device_class: power
state_class: measurement
unit_of_measurement: W
state: >
{# COMMENT: get power #}
{% set power = int(states('sensor.esp_energy_meter_main_p1_momentary_active_import'), 0) %}
{# COMMENT: half price during these hours #}
{% set hour_now = now().hour %}
{% if hour_now >= 22 or hour_now < 6 %}
{% set power = power / 2 %}
{% endif %}
{# COMMENT: return power #}
{{ power | round(0) }}
power_max_tracker:
- source_sensor: sensor.power_tracking_grid_sensor
num_max_values: 3
monthly_reset: true
jkoelker
Metadata
Metadata
Assignees
Labels
No labels