Temperature sensor, smart plug & oven. Not turning on/off with temperature

Hi!

I have installed HA OS in a VM and its working fine. It has found my devices from philips hue, and some others.

I am trying to get a temperature sensor from Philips, to control a smart plug (which has an oven connected to the smart plug).

I am unable to get it to trigger automatically. I have made this automation, just to test the setup.

alias: Ovn Stue Av
description: Slå av ovn i stue over gitt temperatur.
trigger:
  - type: temperature
    platform: device
    device_id: 2941d140e8b5497d05bb51af2c86dc6b
    entity_id: sensor.hue_motion_sensor_2_temperature
    domain: sensor
    above: 22
condition:
  - type: is_temperature
    condition: device
    device_id: 2941d140e8b5497d05bb51af2c86dc6b
    entity_id: sensor.hue_motion_sensor_2_temperature
    domain: sensor
    above: 22
action:
  - type: turn_off
    device_id: 87bbde2ea635327b35a9e36f3182cc48
    entity_id: light.ovn_stue
    domain: light
mode: single

What I do now to test is the following:

  1. Turn on the oven in the living room manually.
  2. Check manually the temperature from sensor.hue_motion_sensor_2_temperature and its below 22.
  3. I am running the automation automatically, and as far as I understand it should NOT turn the oven off because the temperature is below 22. But it turns it off when I run it manually.

I run it manually, because it doesnt seem to do it by itself? What am I missing?

Apprechiate any advice, or pointers to where I can find out how to this simple setup. I have tried watching some youtube videos, and reading the documentation. Someone talks about trying the “Generic Thermostat” addon? but I cant find that anywhere?

Trigger and condition are the same, so simplify your automation and retest :

alias: Ovn Stue Av
description: Slå av ovn i stue over gitt temperatur.
trigger:
  - type: temperature
    platform: device
    device_id: 2941d140e8b5497d05bb51af2c86dc6b
    entity_id: sensor.hue_motion_sensor_2_temperature
    domain: sensor
    above: 22
action:
  - type: turn_off
    device_id: 87bbde2ea635327b35a9e36f3182cc48
    entity_id: light.ovn_stue
    domain: light
mode: single

FYI - RUN ACTIONS does just that, irrespective of the triggers and conditions. If you want to test you actually have to wait for it to happen.

One way to test is to try a different trigger and see what happens

Ah, so run the action will always trigger the end result. Regardless. Good to know. Thanks!

I tried the simpler method earlier, but it didnt seem to work. I will try again and see if it works.

If I set the sensor.hue_motion_sensor_2_temperature temperature manually in developer tools, the automation triggers correctly. However it did not trigger automatically on temperature changes yesterday night.

What about the Generic Thermostat?

1 Like