After Update 2021.3 seems that mine temp automation don't work

Hi Every one, I am for the first time at this forum, because is the first time I can’t find a solution.

Lat me give the full problem:

I had a server with hass.io on it but because of some strange thing it broke and I change it to a new Intel-Nuc, install the image and restor my settings no problem.
after that everything went as normal thil the update 2021.3 came ( a day after).

It seams that my starting up my heater don’t work any more the temperatur drops and the heater sould start but it do not, strangely if i activate it by hand , when it met the temp it shut met it turn it of without any problem.

I am so confuse because it is not in the list of broken update so i cant find the way to fix it.

I even deleted my old automation and remake a new one and on a different way but still noting.

thanks in advanced.

Best regards

Neopegasus

Please show the (YAML) automation and check the error log for any messages.

Hi Amelchio,
here is my .yalm:

- id: '1614968481208'
  alias: Warming Up
  description: Warming the hous up to a good temperature
  trigger:
  - platform: numeric_state
    entity_id: sensor.temperature_2
    below: '21'
  condition:
  - condition: time
    after: 07:00
    before: '20:00'
  - condition: state
    entity_id: input_boolean.notify_home
    state: 'off'
  action:
  - service: switch.turn_on
    target:
      entity_id: switch.lanswitch1
  mode: restart

the supper strange thing is that after i do the first turn on manually it keep doing the automation till the next day.

the problem i could find is this:

2021-03-06 08:17:17 WARNING (MainThread) [homeassistant.components.homeassistant.triggers.numeric_state] Error initializing 'Warming Up' trigger: In 'numeric_state' condition: entity sensor.temperature_2 state '°C' cannot be processed as a number

Still strange as I did not change that in the past

I’m pretty sure that
below: ‘21’
should be
below: 21

That looks odd, do you know why the state is °C rather than a number? What is the state of sensor.temperature_2 state when you look at the entity in the States view in Developer Tools?

It’s it under 21 when it gets to 7am, if so it will never trigger.
You should really replace this automation with a generic thermostat, and have automations or use scheduler to set the target temperature according to a schedule

That doesn’t matter. The string will be automatically converted to a float.

Thanks Fantangelo, but i do my automation visa the webui, its because Amelcio ask me for the .yalm i copy the .yalm this is how it looks like:

When you check history for sensor.temperature_2 do you see temperature where it reported below 21? Basically sensor reporting temperature at correct intervals etc?

Also, if you goto automation tab you will see the time when each automation was triggered last (Does not mean it worked or running correctly just that trigger worked)?

Hey Amelchio here is the state:

the thing I cant figurout is that it was working fine and it work fine after the morning manually turn it on.
and in the past with the old hass.io i never had a problem , is there somthing i am missing in the new one?

it is below 21 ant the automation is make that if the temp is below 21 it should turn the heater on.

i was checking that generic Thermostat, but i cant change the intity to that, its a zigbee sensor. did not have problem before with it.

I know what you want it to do, what I’m telling is the reason it may not be working and the better approach to make it work.

If you expect the automation to execute when restarting Home Assistant, that will no longer happen. This is a change in 2021.3.

Rather, it will only execute when the sensor value crosses from above 21 to below 21.

its not only checking the History, as I said before if i start the heater manually(turning it on in hassio) the turning of automation will work and after that first time i do that it will work the rest of the day till the next day when its 7 a clock again i need to do it manually its like he dont know what to do till when I show him/it.

Do it have to do with the new setting of the starting state?
my switch dont send a status as it is a command-line switch:

switch:

  - platform: command_line
    switches:
      lanswitch1:
        command_on: echo -n "11" | nc -n -w 1 192.168.10.120 6722
        command_off: echo -n "21" | nc -n -w 1 192.168.10.120 6722

The only 2 thing that change is that i have now a Nuc with hassos instead of hassio on generic linux and the hassio is updated ( whitch is normaly good), but I cant find out where to thel the automation ignore the state of the switch ( if that is the problem).

still is strange that after I turn it on hassio will take over after word for that day (24hours) (looks like hass.io see the state)

so it have to do with the new faile-safe setting from hassio 2021.3?

but then is a litle problem because if you do a update your Home assistant will resaart meaning the automation will not work , what explain to why it dont work after the update and every thime i toucht i did something wrong and adjust things and reboot… what is a option for doing this than ?

I cant find the way to do the generic thermostat what was said before, its a zigbee temp-sensor I dont know if its possible ore how to do it ( could not find it ).

It will only miss if the temperature drops below 21 right as you reboot. I don’t think that will be a problem but you can additionally trigger on startup if you want to be really sure.

Also, you have a time condition … so if the temperature is already below 21 at 7:00 I guess it will never execute until you manually bring the temperature above 21. That might be your actual problem. You can fix this with an additional time trigger which has a condition on the current temperature.

(I am still miffed by the warning though, something seems off there)

It would be something like this:

climate:
  - platform: generic_thermostat
    name: House
    heater: switch.lanswitch1
    ac_mode: false
    min_temp: 16
    max_temp: 25
    hot_tolerance: 0.5
    target_temp: 21
    away_temp: 16
    initial_hvac_mode: heat
    target_sensor: sensor.temperature_2

An automation would be used to control when climate.house is enabled (07:00) and disabled (20:00). While it is enabled, it automatically maintains the temperature at 21 within a tolerance of 0.5 degrees.

2 Likes

Thanks Amelchio, I will try some things and keep you and the rest updated!

I notice it with a second automation to that have to do with also with temp sensor but not from zigbee

Interesting , I will try it soon 123 Taras! thanks

Ditto. Kind of hope the Generic Thermostat suggestion doesn’t distract from discovering the cause of that curious complaint.

PS
I like the new format of the error warning message. :+1:

1 Like