It is not broken you just need to know what to do.
Why are you using a Custom Group? Looks like you are including all of your batteries. Custom group is if you have a few to check or you would like a different % to monitor.
In your custom action you need to do it correctly and it will work. Look in the text were I got the ââ and you may have to define your response donât push the run action to test. I donât use AI but you could try something like this.
custom_actions:
- if:
- condition: template
value_template: "{{ not sensors_names_custom_group == '' }}"
then:
- action: media_player.volume_mute
metadata: {}
target:
entity_id: media_player.arc_ultra
data:
is_volume_muted: true
- action: conversation.process
metadata: {}
data:
text: >-
"You seem to have low batteries, here they are
{{sensors_names_custom_group}}"
response_variable: response1
- variables:
ai_message: >-
{{ response1.data if response1 is defined else
'Batteries require attention, sir.' }}
- action: assist_satellite.announce
metadata: {}
target:
entity_id: assist_satellite.voice_pe_assist_satellite
data:
message: "{{ ai_message.response.speech.plain.speech}}"
preannounce: false
- if:
- condition: template
value_template: "{{ sensors_names_custom_group == '' }}"
then:
- action: media_player.volume_mute
metadata: {}
target:
entity_id: media_player.arc_ultra
data:
is_volume_muted: true
- action: conversation.process
metadata: {}
data:
text: Im not seeing any low batteries, your all good to go
response_variable: response2
- action: assist_satellite.announce
metadata: {}
target:
entity_id: assist_satellite.voice_pe_assist_satellite
data:
message: "{{ response2.response.speech.plain.speech}}"
preannounce: false
I donât use AI so you will need to know what your doing in your custom action.
â{{ ai_message.response.speech.plain.speech}}â was my fault in posting. i was messing with the code and forgot to post the updated. but i was using the correct response variable from the conversation process into the assist satellite action, should have checked that before posting.
i use custom group because i have a lot of zwave sensors and really theres only certain ones that need to be checked. that list isnât all of my batteries, just the ones i want notified for. i currently have the automation working using standard tts. However i have spotted another problem.
If i send a tts and a phone notification, only the tts sends. if i disable custom actions, then the phone notification sends. itâs not sending both. Would it be better to just send the phone notification in the custom action as well?
The custom actions are the first thing that happens in the action. If there is something wrong with the custom action it will fail and the automation will stop so the rest of the actions (phone notification) will be stopped.
You shouldnât have to and it easier to use the blueprint UI. I do have a idea were I will run the custom action in parallel with the rest of the actions. This should resolve your bug in your custom action.
Missed your reply! Yeah, the notify groups have to be right now. configuration.yaml
notify:
- name: notify-person1-phone
platform: group
services:
- service: mobile_app_person1_pixel_10
- name: notify-person2-phone
platform: group
services:
- service: mobile_app_person2_pixel_9
- name: notify-person1-watch
platform: group
services:
- service: mobile_app_person1_pixel_watch_3
And then each of those names is available as a notification option in automations. So I have a crap-tonne of automations to send notifications using them. Get a new phone or watch, and I just have to change the device in configuration.yaml rather than each automation.
It would be way cooler if this was made available in the gui instead of having to do this, but for now itâs not