I really struggle to get my head around the way HA lays out it automations. But I have a project Im working on and I know how I want it to work but not really sure how to implement it.
I have Hive TRVs and the hive custom component which provides some more info from the Hive system.
When a TRV requires heating, it sets the heating system to boost mode via heat on demand and this starts the boiler and pump. I want my automation to work as follows.
When my schedule is on, and the Hive hot water demand is off, set all TRVs to boost mode and send an MQTT message containing some values (more below). If the schedule is off or the hot water demand is on, then return TRVs to schedule mode and send an MQTT message.
The MQTT message is for my new device which is for the boiler control. It will receive a 3 character value of 0/1 to set the mode to manage the boiler enable or let it run to full temperature, and the remaining 2 characters for the setpoint to control to. This part is sorted, I have the device, its all working, sending and receiving MQTT data but not from HA yet. Ideally I would like HA to regularly send the MQTT message so the device remains up to date.
Ive created a schedule helper which I think is the right first step. I have the Hive connected and all data, but not really sure how to go about creating the automation.
I need to know that Im using the correct entity to set the TRVs to boost/schedule, and at the same time send the appropriate MQTT message.
The device will also relay the status back via MQTT.
I already have an MQTT integration and I have various other MQTT sensors set up. But I cant remember how I did them because theyre not in the configuration.yaml and whatever I google, says add them there
The MQTT sensors is less of a priority, I can always see on the MQTT explorer what is happening. But I definitely need to send the MQTT from HA to the device otherwise it wont work.
Any guidance on this would be much appreciated.
Thanks!