Getting `not a valid value for dictionary value @ data['entity_id']` on Xiaomi Air Purifier 2s

I’m trying to get the device to trigger based on air quality, but I get this:

alias: Air
description: ""
trigger:
  - type: pm25
    platform: device
    device_id: fabae87dddbc91d40922ff97b2cf4722
    entity_id: 4a8e91bf0f348d2d853782c89c63d110
    domain: sensor
    above: 10
condition: []
action:
  - type: turn_on
    device_id: fabae87dddbc91d40922ff97b2cf4722
    entity_id: 7b20cf18380d7a7dae000e4bb4b8e265
    domain: fan
mode: single

What is incorrect here?

You appear to have manually edited the device action, and trigger. Neither entity_id listed there is valid.

Don’t edit device triggers/conditions/actions.

Same problem raised here:

Perhaps a new bug? I note that one of the dodgy entity_ids in both topics starts with 7b — coincidence?

no, this was auto generated by HA. I didn’t touch the yaml file.

I solved it by calling the fan service. Refer to the picture at the end of the thread you refered to.

As Gil80 said, this was autogenerated from the template.

I just tried it and it gave me an error
image

ok, it works now after a bit more YAML tinkering.

action:
  - service: fan.turn_on
    target:
      entity_id: fan.air_purifier
    data: {}
mode: single

thanks!