Hi
I am trying to feedback a setting to a custom component using an input number helper (with ID=input_number.ftx_borvarde_tilluft)
But I cannot figure out how to listen to it in my custom component. Among other things I tried to listen to it in my setup
async def async_setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the sensor platform."""
add_entities([ftx_temperatures(comm.FTX(),SENSORS)],True)
# Listener to handle fired events
def handle_event(event):
# Just to get some feedback of it works
print("Success!")
# Listen for helper event is fired
hass.bus.listen("input_value.ftx_borvarde_tilluft", handle_event)
But with the above example the Home Assistant does not even start (but I get no error printout in the log).
How should this be done?
What I want to achieve in general is the be able to trigger to set a new setpoint to my FTX Cooling system from Lovelace. So I want to be able to trigger the “set value” part of my own code to execute with the new setpoint value from Lovelace (the idea was to use the input_number helper with a slider in an Entity Card)
Any ideas how to solve this? I am using the example_sensor as base for my custom component.