Hi there,
I am trying to use a variable in my mobile app notification automation for color and ledColor but the variable is not being set, but is being set in “message”, is this possible for ledColor and color? see code below:
I am using a temporary toggle button to trigger the variable
platform: state
entity_id:
- input_boolean.emergency_switch_helper
to: "on"
variables:
bin: " {{state_attr ( 'calendar.calendar', 'message' ) | regex_replace(find='Blue bin collection', replace='\"red\"', ignorecase=False) | regex_replace(find='Black bin collection', replace='\"red\"', ignorecase=False) }} "
service: notify.mobile_app
data:
message: >-
It is Bin day tomorrow. It is {{ state_attr("calendar.calendar", "message")
}} day on {{ state_attr("calendar.calendar", "start_time") }}, please put
the Brown bin out as well. {{ bin }}
data:
ledColor: {{ bin }}
color: {{ bin }}
channel: Bin collection
tag: bin-collection
enabled: true