Spirit thermostat plan, thoughts wanted

Hi all,

I have 2 Spirit Thermostats, connected to Home Assistant with a Aeon Labs Gen5 stick and I’m searching for the best way to create the following idea that I have:

I’d like to have a app on my cell with a button called (Turn on heating), I thought I can use Tasker for this and send a message to CloudMQTT. Messages from this service are already being polled in Home Assistant for my phone location.

Once Home Assistant picks up the message trough a sensor it should do the following;

  • Check if the button was used past 2 hour, if so do nothing…
  • If above was false, send on command to the Spirit to fully open valve
  • Leave the valve open for 20 minutes, after this turn of the heating
  • During the heating the air is being pushed out by a number of speedcomfort fans beneath the radiators

You might wonder why I’d like to create a such unusual program for my heating, the reason is that the prices for heating here are comparable with gold… In our apartment building is a central heating system and apartment heating is not separated by valves. Our heating bill is based on some sensors attached to our radiators that calculate the usage on the most efficient way for the supplier and not the customer.

I’ve visited a colleague of mine that has the same situation and he has built an python solution for this, but I’d like to keep it in Home Assistant if possible. Also his script is intended for Domoticz and he uses the Danfoss valves.

I made a start with a automation:

alias: "Turn on the heating in the livingroom"
initial_state: "off"
trigger:
  - platform: state
    entity_id: switch....
    state: 'off'
    for:
      minutes: 20
action:
  - service: service: homeassistant.turn_on
    entity_id: climate.eurotronic_livingroom

alias: "Turn on the heating in room 1"
initial_state: "off"
trigger:
  - platform: state
    entity_id: switch....
    state: 'off'
    for:
      minutes: 20
action:
  - service: service: homeassistant.turn_on
    entity_id: climate.eurotronic_room1