I’m still pretty new to all this and I have been working on this for hours now. I have some displays that return the active page as a number entity:
number.garage_hasp_disp04_active_page_2
I am attempting to write an automation that triggers whenever the entity changes then have a condition to test for a certain page. Here is my current code although I have tried numerous methods.
alias: test template
description: ""
triggers:
- trigger: state
entity_id:
- number.garage_hasp_disp04_active_page_2
conditions:
- condition: numeric_state
entity_id: number.garage_hasp_disp04_active_page_2
above: 0
value_template: "{{ states(number.garage_hasp_disp04_active_page_2) == 1}}"
actions:
- action: notify.pushover
metadata: {}
data:
message: It works!
mode: single
Unfortunately keep getting the following error:
Error: In 'numeric_state': In 'numeric_state' condition: template error: UndefinedError: 'number' is undefined
The problem seems to be the fact that the entity is a number type but I don’t quite know how to handle it. I would appreciate any suggestions.
Thanks,
Bob