How to set state of a device

Hi,

I have started to use HA this week and after some difficulties I have managed to get it to do most of what I want. I have my home cinema, phones lights etc all integrated and working but Im having some issues with my electric fire.

I have an automation that sets the lights to a specific colour and brightness depending on the time of day and what it being watched and it also turns the fire on (just the flame affect lights, not the heat function).

Im trying to get it to turn the heat on if after sunset and below a certain temp. I have the automation working but the fire only has a few options that can be changed and setting it to heat isnt one of them, but if I set it to heat via the remote, I can see in the logs that its state has changed to heat.

I made a script that changes the state to heat to test but it doesnt work. Is there a way for me to get this to work? The screenshots attached show the log entries of the heat being turned on via remote, and also the state changes when being on and off via the remote.

Before I get too far down this rabbit hole, just because there is a sensor that shows that the heat is on doesn’t mean you can actually turn on the heat by changing the sensor. You can absolutely change the state of the sensor, but, all you’re doing to changing what HA is displaying. You could change the state to INFERNO and it will probably have no effect on the actual fireplace. If there is no switch or other option in the integration to turn on the heat, you should contact the integration developer to see if it can be added.

If it works with a remote I’d get a Broadlink RM4 (they are not expensive) and get HA to send the “heat” command to the fire. Simple. That is how I get my non-smart IR devices to become smart.

As stated above changing the state of the sensor only affects HA - it doesn’t run backwards.

That’s correct, changing the state just overwrites what HA has in memory. Only time I’ve ever used that is when testing an automation. In general, you don’t want to do that.

Thanks for the replies, I wasnt setting the state was only for HA and not the device.

The issue was the fire has a timer that has to be set to determine when the heat function can be used and no time schedule was set.

Thanks for the help