Hey Guys,
I’m new on HA. I want to setup my Kasa HS110. I see the Power Consum in the Graph, but i want that is near realtime. 30sec for new Data is to long. 10sek are really better for my setup.
I find that “scan_intervall” can change that time, but if i type it in my code, i become a error.
“Invalid config for [sensor.template]: [scan_interval] is an invalid option for [sensor.template]. Check: sensor.template->sensors->switch_mark_ampere->scan_interval. (See ?, line ?).”
Original Code with 30sec.
sensor:
- platform: template
sensors:
switch_mark_ampere:
friendly_name_template: "{{ states.switch.mark.name}} Strom"
value_template: '{{ states.switch.mark.attributes["current_a"] | float }}'
unit_of_measurement: 'A'
switch_mark_watt:
friendly_name_template: "{{ states.switch.mark.name}} Leistung"
value_template: '{{ states.switch.mark.attributes["current_power_w"] | float }}'
unit_of_measurement: 'W'
switch_mark_total_kwh:
friendly_name_template: "{{ states.switch.mark.name}} Gesamtverbrauch"
value_template: '{{ states.switch.mark.attributes["total_energy_kwh"] | float }}'
unit_of_measurement: 'kWh'
switch_mark_heute_kwh:
friendly_name_template: "{{ states.switch.mark.name}} Tagesverbrauch"
value_template: '{{ states.switch.mark.attributes["today_energy_kwh"] | float }}'
unit_of_measurement: 'kWh'
Code with Error
sensor:
- platform: template
sensors:
switch_mark_ampere:
friendly_name_template: "{{ states.switch.mark.name}} Strom"
value_template: '{{ states.switch.mark.attributes["current_a"] | float }}'
unit_of_measurement: 'A'
scan_interval: 10
switch_mark_watt:
friendly_name_template: "{{ states.switch.mark.name}} Leistung"
value_template: '{{ states.switch.mark.attributes["current_power_w"] | float }}'
unit_of_measurement: 'W'
scan_interval: 10
switch_mark_total_kwh:
friendly_name_template: "{{ states.switch.mark.name}} Gesamtverbrauch"
value_template: '{{ states.switch.mark.attributes["total_energy_kwh"] | float }}'
unit_of_measurement: 'kWh'
scan_interval: 10
switch_mark_heute_kwh:
friendly_name_template: "{{ states.switch.mark.name}} Tagesverbrauch"
value_template: '{{ states.switch.mark.attributes["today_energy_kwh"] | float }}'
unit_of_measurement: 'kWh'
scan_interval: 10