home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.62k stars 30.38k forks source link

alerts do not send sensor states in alert name after update to 2024.10.* #128557

Open shtorm93 opened 10 hours ago

shtorm93 commented 10 hours ago

The problem

After updating the configuration does not grab and send the sensor state, just sends plain text from configuration.

example: name: "CO2 level too high! ({{states('sensor.co2_3')|int}}ppm)" was sending CO2 level too high! (1525ppm) but after update sends "CO2 level too high! ({{states('sensor.co2_3')|int}}ppm)"

What version of Home Assistant Core has the issue?

2024.10

What was the last working version of Home Assistant Core?

2024.9.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

alert

Link to integration documentation on our website

https://www.home-assistant.io/integrations/alert/

Diagnostics information

No response

Example YAML snippet

alert:
  co2notify:
    skip_first: false
    name: "CO2 level too high! ({{states('sensor.co2_3')|int}}ppm)"
    entity_id: binary_sensor.co2_exceded
    state: "on"
    repeat: 10
    can_acknowledge: false
    notifiers:
      - mobile_app_sm_s908b
  currentnotify:
    skip_first: false
    name: "Current too high! ({{states('sensor.sdm230m_current')|float(default=0)}}A)"
    entity_id: binary_sensor.current_exceded
    state: "on"
    repeat: 0.25
    can_acknowledge: true
    notifiers:
      - mobile_app_sm_s908b

Anything in the logs that might be useful for us?

No response

Additional information

Maybe connected to this? https://github.com/home-assistant/core/pull/126030

home-assistant[bot] commented 10 hours ago

Hey there @home-assistant/core, @frenck, mind taking a look at this issue as it has been labeled with an integration (alert) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `alert` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign alert` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


alert documentation alert source (message by IssueLinks)

bonaas commented 5 hours ago

Hi.

I think I have a similar problem.

This command works under "Developer Tools -> Actions". It speaks the text in "input_text.mobil_message".

action: notify.mobile_app_mobil
data:
  message: TTS
  data:
    tts_text: "{{ states.input_text.mobil_message.state }}"
    media_stream: alarm_stream_max

but this "Button card" only speaks "{{ states.input_text.mobil_message.state }}" and not the message in the "input_text".

show_name: true
show_icon: false
type: button
tap_action:
  action: perform-action
  perform_action: notify.mobile_app_mobil
  data:
    message: TTS
    data:
      tts_text: "{{ states.input_text.mobil_message.state }}"
      media_stream: alarm_stream_max
name: Send

BRG, Bjørn