Hy everybody, I’m struggling with a Custom Sensor:
- platform: custom
id: custom_sensor
lambda: |-
auto sensor = new CustomSensor();
sensor->custom_function(0);
App.register_component(sensor);
return {sensor->esphome_sensor};
Custom_function is public and executed once when the sensor is created, this is tested.
How can I recall this function in lamda in esphome for example at the press of
a button in order to update the value passed to the function itself?
After many attempts I can’t figure out how to do it.
Thanks in advance.