I have made a unit using a ESP8266, and a CSE7766 voltage/current sensor. It works great but I would like to change update_interval with number components…
my code :
- platform: cse7766
id: cse7766_sensor
current:
name: "T1 Current"
voltage:
name: "T1 Voltage"
id: "T1_Voltage"
accuracy_decimals: 1
power:
id: my_power
name: "T1 Power"
update_interval: never
number:
- platform: template
id : template_number
name: "Template number"
min_value: 1
max_value: 600
step: 1
optimistic: true
time:
- platform: sntp
id: my_time
on_time:
- seconds: !lambda |-
return (id(template_number).state) ;
then:
- lambda: 'id(cse7766_sensor).update() ;'
This code throws an error:
:
return (id(template_number).state) ;
esphome compiler show this error : this option is not templatable!.
Is there a way to fix this?