Xiaomi temp sensor below 19 degree start tado heating not working on my setup

I have this sensor which is show true and false correct.

- platform: template
    sensors:
      halofutes_on:
        friendly_name: 'Haloszoba futes be'
        value_template: >
          {%- if (states('sensor.0x00158d0002b57f51_temperature') | int < 19) -%}
            True
          {%- else -%}
            False
          {%- endif -%}

But If in automation want to use trigger and nothing happend:

alias: Heating xiaomi trigger
description: ''
mode: single
trigger:
  - platform: state
    entity_id: sensor.halofutes_on
    to: 'on'
condition: []
action:
  - service: climate.set_temperature
    data:
      temperature: 21
    entity_id: climate.room_1

Where is the problem? Please help.

There are a number of issues here.

  1. You are using a sensor instead of a binary sensor.

  2. Your sensor has the states True or False. Yet your automation trigger is looking for the state string 'on'

Delete your sensor and use this automation instead:

alias: Heating xiaomi trigger
description: ''
mode: single
trigger:
  - platform: numeric_state
    entity_id: sensor.0x00158d0002b57f51_temperature
    below: 19
condition: []
action:
  - service: climate.set_temperature
    data:
      temperature: 21
    entity_id: climate.room_1

In addition to that

action:
  - service: climate.set_temperature
    data:
      temperature: 21
      hvac_mode: **set your hvac_mode here**
    entity_id: climate.room_1

Find it under developer tools/states

hvac_mode: is optional for the service climate.set_temperature See https://www.home-assistant.io/integrations/climate/#service-climateset_temperature

Though I agree it would be best to specify in case the climate device was left in cooling mode.

But if I use this numeric state trigger only work if the temperature changed from 19 to 18.9
but if the temperature alredy 18 will never trigger this automation.
Thats why I want to use this sensor.

I know, I just found some issues with my tado sometines not heating and sometimes setting the wrong temperature… For some reason since I do both things, It has never made that mistake again.

My tado thermostat is working good when i change only the temperature.

Your sensor will do exactly the same thing.

Then stick to tom_I suggestion

Then it’s not good for me. So what is the solution?

what are you trying to achieve?

Have tado thermostat in my living room and have xiaomi temp sensor in my bedroom.
In the living room have fireplace and the thermostat not turn the heating on too much. Soo my bedrom getting cold. I want that If my bedrom temp below 19 start the heating on higher temparature untill in the bedrom temp again above 19 and after stop heating. But I need this only between 01:00 - 05:30
The problem is If the temp in my bedroom before 01:00 below 19 the automation never will be triggered and the room very cold on the morning. I hope it is understand what I write :slight_smile:

Following tom_I example:

alias: Heating xiaomi trigger
description: ''
mode: single
trigger:
  - platform: numeric_state
    entity_id: sensor.0x00158d0002b57f51_temperature
    below: 19
  - platform: time
    at: '01:00:00'
condition:
  - condition: numeric_state
    entity_id: sensor.0x00158d0002b57f51_temperature
    below: 19
  - condition: time
    after: '01:00:00'
    before: '05:30:00'
action:
  - service: climate.set_temperature
    data:
      temperature: 21
    entity_id: climate.room_1
1 Like

regarding this. If you want it to stop when it raises above 19Âş.

alias: Heating xiaomi trigger
description: ''
mode: single
trigger:
  - platform: numeric_state
    entity_id: sensor.0x00158d0002b57f51_temperature
  - platform: time
    at: '01:00:00'
condition:
  - condition: time
    after: '01:00:00'
    before: '05:30:00'
action:
  - service: climate.set_temperature
    data:
      temperature: >
        {% if states('sensor.0x00158d0002b57f51_temperature') > 19 %}
          10
        {% else %}
          21
        {% endif %}
    entity_id: climate.room_1

It isn’t good for me because this: “The problem is If the temp in my bedroom before 01:00 below 19 the automation never will be triggered and the room very cold on the morning.”

That’s what this trigger does:

  - platform: time
    at: '01:00:00'

it checks at 1am. In combination with the conditions it checks to see if the temperature is already low at at that time. It does do what you want. Try it.

Ok and what happend at 03:00 and the temp again below 19?

Then this trigger will fire:

  - platform: numeric_state
    entity_id: sensor.0x00158d0002b57f51_temperature
    below: 19

And this condition will allow the action to occur:

  - condition: time
    after: '01:00:00'
    before: '05:30:00'

Ok will try it. Thank You.

Again have a problem I need that If for this xiaomi temp sensor the temperature above 19 degree turn back my tado thermostat to auto mode.