Automating heating with a temperature sensor group

Hi everyone, I hope someone can point me in the right direction!

I have some sonoff temperature and humidity sensors in all the rooms in my house and I’ve created 2 sensor groups using the Helper > Group > Sensor Group functionality found in Home Assistant which are reporting the mean temperature of the combined temperatures in the group.

This all seems to be working as expected so so far so good.

I have also set up an automation using the numerical entity state trigger that is supposed to check the temperature of this group entity and if it drops below 20 for at least 10 minutes then to turn the thermostat up to 22 for 30 minutes and then lower it back down to 18.

I’ve run this automation manually and the thermostat changes and timers all seem to work however it refuses to run automatically based on the state of the temperature sensor group.

I’ve attached a screenshot of the automation for the sensor group, if anyone can see any obvious issues or has successfully got similar working than I would love to know.

alias: House temperature
description: ""
triggers:
  - trigger: numeric_state
    entity_id:
      - sensor.average_downstairs_temperature
    for:
      hours: 0
      minutes: 10
      seconds: 0
    below: 20
conditions:
  - condition: time
    after: "06:00:00"
    before: "22:00:00"
actions:
  - action: climate.set_temperature
    metadata: {}
    data:
      temperature: 21
    target:
      device_id: a4b78ce99781bfb24233903965ad940b
  - action: notify.mobile_app_pixel_7_pro
    metadata: {}
    data:
      message: Daytime heating is on
      title: Daytime heating
  - delay:
      hours: 0
      minutes: 30
      seconds: 0
  - action: climate.set_temperature
    metadata: {}
    data:
      temperature: 18
    target:
      device_id: a4b78ce99781bfb24233903965ad940b
  - action: notify.mobile_app_pixel_7_pro
    metadata: {}
    data:
      message: Daytime heating is off
      title: Daytime heating
mode: single

Edit: Removed screenshot and added YAML code

Thanks in advance!

Don’t post screenshots, always post the YAML of your automations, marked up as code so that indentation etc. is shown correctly.

Also are your thermostats really that bad at their one job that you have to manually manipulate the termperature up and down?!

Might want to look into a generic thermostat helper rather than an automation in that case.

Updated my post with the YAML code.

It’s more about fine tuning the heating and just playing around with HA to see what I am able to do with it.

How exactly have you tested and determined that the trigger does not work? State triggers typically only fire when the state changes. If the temperature is already below 20° at the time the automation is loaded, that 10 minute countdown of sorts will never begin until the temperature rises above 20° and then drops down below the threshold again.

You probably should make automation which turns thermostat for example to 22°C for as long as your temperature rises back to 20°C. Otherwise I don´t see this making any sense?

You were exactly right, everything is working now after some tweaking and experimenting. Thanks very much for your help.

Yeah, this is how I now have it set up after much tinkering!