I wonder if somebody could point me in the right direction. I’m a long time user of Domoticz, and recently moved over to Home Assistant. Although I’ve got the majority of my home automation up and running, I’m struggling to get my head around how to control my IR ceiling fan.
I have a Westinghouse IR fan with 4 states, controller via Logitech Harmony Hub.
In Domz, I used to have a dummy switch, with 4 states (Off, Low, Med and Max). Dependant on the temperature in the room, Domz would call a shell script which would in turn would send the correct IR signal to the fan.
In Home Assistant, I’ve set up 4 scripts for the 4 states which work great from the Scripts screen.
I’ve spent the day at looking at script example, using templated switches, but I’m getting a little lost.
Assuming I have 4 scripts setup and working in Home Assistant (1 = off, 2 = Low, 3 = Med, 4 =Max), below is pseudo code of what I’m trying to achieve.
IF numeric_state of sensor.office_sensor_temperature < 21
run script 1
IF numeric_state of sensor.office_sensor_temperature => 21
run script 2
IF numeric_state of sensor.office_sensor_temperature => 23
run script 3
IF numeric_state of sensor.office_sensor_temperature => 25
run script 4
I’m not sure if I even need to use Scripts in Home Assistant, as I can directly control the fan via the remote.send_command function.
If somebody can point me in the right direction, that would be great.
Thanks in advance.
Darren