Automation trigger not working ? xiomi

Hello, my issue is that I cannot create automation with the temperature data from “sensor.xiaomi_smart_air_purifier_4_lite_temperature” What could be the reason for this?

alias: Yeni Otomasyon
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.xiaomi_smart_air_purifier_4_lite_temperature
    attribute: sicaklik
    below: 18
    for:
      hours: 0
      minutes: 0
      seconds: 0
    value_template: 18,0
condition: []
action:
  - type: turn_off
    device_id: d639f8862c2f79450f8f625f0e7e3619
    entity_id: 3306b96ac4513267e8ac5a266b4f8008
    domain: switch
mode: single


Change this:

trigger:
  - platform: numeric_state
    entity_id:
      - sensor.xiaomi_smart_air_purifier_4_lite_temperature
    attribute: sicaklik
    below: 18
    for:
      hours: 0
      minutes: 0
      seconds: 0
    value_template: 18,0

To this:

trigger:
  - platform: numeric_state
    entity_id:
      - sensor.xiaomi_smart_air_purifier_4_lite_temperature
    below:  18

I’m afraid it still didn’t work. I’m correctly checking the sensor data; for example, when it’s 23 degrees inside, the device activates regardless of the trigger conditions. Even if I input -1 or 30 degrees, the specified device still activates

How are you testing the automation?

Uploading: runrun.png…
i am pressing the ‘Run’ button here

Then that’s why the trigger I suggested made no difference.

The Run command only executes the automation’s actions. It doesn’t test the automation’s trigger or condition.

Reference

Testing your automation


To test your automation, wait for the sensor’s value to change from a temperature above 18 to below 18. At the moment the temperature crosses the threshold of 18, the Numeric State Trigger will trigger.

Another way to test it is to force the sensor’s value to be less than 18.

  1. Go to Developer Tools > States
  2. Find sensor.xiaomi_smart_air_purifier_4_lite_temperature in the list and click it.
  3. Scroll to the top of the page where all of the sensor’s properties are displayed in a form.
  4. Take note of its current State value (perhaps make a copy of it). It should currently be above 18 in order for the test to work.
  5. Change the value to 17 or anything less than 18.
  6. Click the Set State button.

That should be sufficient to trigger the automation’s Numeric State Trigger.

Optionally, use the same technique to set the sensor’s value back to the original temperature. Otherwise, simply wait for the sensor’s integration to update the sensor’s value.

I thank you very much for your help; I will try as you suggested shortly