Automation Help for a simple notification

Hi

i am trying to create a simple automation to get a notification when i have an error on my Roborock vacuum. The state attributes of the vacuum are the following:

fan_speed_list:
  - Silent
  - Basic
  - Strong
  - Full Speed
battery_level: 100
battery_icon: mdi:battery-charging-100
fan_speed: Strong
model: roborock.vacuum.s5e
lan_ip: 188.188.0.88
mac_address: A0:5A:DD
entity_class: MiotRoborockVacuumEntity
miot_type: urn:miot-spec-v2:device:vacuum:0000A006:roborock-s5e:1
vacuum.status: 8
vacuum.mode: 103
battery.battery_level: 100
state_updater: cloud
props:
  msg_ver: 2
  msg_seq: 530
  state: 8
  battery: 100
  clean_time: 65
  clean_area: 852500
  error_code: 0
  map_present: 1
  in_cleaning: 0
  in_returning: 0
  in_fresh_state: 1
  lab_status: 3

I want to get a notificaion when the error_code (under state props) is greater than 0

My trigger is the following:

trigger:
  - platform: numeric_state
    entity_id: vacuum.roborock_s5e_ef8d_robot_cleaner
    attribute: props.error_code
    above: 0

but the node never executed. For some reason the ‘attribute’ is not working with .error_code

Please help me

I think you need to do like this:

trigger:
  - platform: numeric_state
    entity_id: vacuum.roborock_s5e_ef8d_robot_cleaner
    attribute: props['error_code']
    above: 0

no it is not working

Use a template trigger then:

{{ state_attr('vacuum.roborock_s5e_ef8d_robot_cleaner', 'props')['error_code'] | int > 0 }}