Nodemcu sensors values don't trigger any automation

Hi, I am using nodemcu (esp8266) with esphome and two sensors connected via I2C: One of them is bme680 and the second is scd41. The sensor values are also shown correctly in the Home Assistant Dashboard. Home Assistent and all plugins are updated to the latest SW version. The issue is: if i want to trigger an automation using these sensor values (only showing a notification with the HA app), nothing happens. The notification appears on my mobile phone only if I trigger the automation manually. The issue seems to be limited to the sensors connected via the NodeMCU because other sensors trigger an automation / notification without any issue. Here is my configuration, for example, for raising a notification on the app if the temperature is above 20° Celcuis. The automation is generated with the wizard:

alias: myNewBME680automation
description: ""
trigger:
  - type: temperature
    platform: device
    device_id: 90cd04e6989451724c6d66a80d8a95dc
    entity_id: 732550aa0b71b593c44d8966f367934d
    domain: sensor
    above: 20
condition: []
action:
  - device_id: 440c49d85f802b8baa5fec230f0941c7
    domain: mobile_app
    type: notify
    message: myBME680 notification
    title: myBME680title
mode: single

You are aware that automation will only trigger if the temperature goes from below to above 20, right?

Hi, I just wanted to mention that the issue is solved: using the platform numeric_state instead the platform ‘device’ (The platform ‘device’ was suggested by the graphical wizard). Here is an example of a code:

alias: CO2 numeric value
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.nodemcu_1_schlafzimmer_co2
    above: 700
condition: []
action:
  - service: notify.mobile_app_pixel_6
    metadata: {}
    data:
      title: CO2 too high
      message: CO2  {{states("sensor.nodemcu_1_schlafzimmer_co2") }}
mode: single