I have a grid card with 3 buttons defined.
Buttons: [Sun seen] [Sun in shadow] [Sun not seen]
The button reads the current sun azimuth and elevation and prints it to file together with a string based on the button option (yes/no/shadow).
I did this with the old notify service which has worked for a long time and still does. However when trying to migrate to the new “notify.send_message” action the sensor values are no longer evaluated. Instead of printing the following expected value to file:
2024-10-19T12:00:00+00:00 , sun, 180,50, yes
it prints:
2024-10-19T12:00:00+00:00 , sun, {{states(‘sensor.sun_current_azimuth’)}},{{states(‘sensor.sun_current_elevation’)}}, yes
New code:
square: false
type: grid
cards:
- show_name: true
show_icon: false
type: button
tap_action:
action: perform-action
target:
entity_id: notify.sky_basementview
perform_action: notify.send_message
data:
message: >-
, sun,
"{{states('sensor.sun_current_azimuth')}}","{{states('sensor.sun_current_elevation')}}",
yes
name: Sun seen
icon: mdi:white-balance-sunny
Old code:
square: false
type: grid
cards:
- show_name: true
show_icon: false
type: button
tap_action:
action: perform-action
target: {}
perform_action: notify.sky_basementview
data:
message: >-
, sun,
{{states('sensor.sun_current_azimuth')}},{{states('sensor.sun_current_elevation')}},
yes
name: Sun seen
icon: mdi:white-balance-sunny
Until this is fixed, I can not replace my old notify services with the new notify.send_message actions.
Home Assistant Version:
- Core2024.9.3
- Frontend20240909.1