Thank you all in advance for the guidance you give on the below. I feel like I know what I want to do, I just don’t know how to actually do it.
Below is the name of the helper I am using:
input_number.tts_volume
I would just like to store the value of “input_number.tts_volume” before this part happens:
And then after that happens, I would set the volume back to what it was before this portion ran.
- service: script.jarvis_alert
data_template:
message: Turning on Dog Mode.
Below is the automation I have.
- id: dog_mode_activated
alias: Dog Mode Activated
description: If done via motion annouce in kitchen. If manually just text.
trigger:
- platform: state
entity_id: binary_sensor.gym_motion_sensor
to: 'on'
- platform: state
entity_id: input_boolean.dog_mode
to: 'on'
action:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.to_state.attributes.friendly_name == "Dog Mode"
}}'
sequence:
- service: script.text_notify
data:
who: parents
title: Dog Mode
message: Dog Mode has been enabled manually
data:
group: modes
tag:
- service: script.dog_mode_lighting_on
- delay:
minutes: 20
- service: input_boolean.turn_off
entity_id: input_boolean.dog_mode
- conditions:
- condition: or
conditions:
- condition: state
entity_id: alarm_control_panel.alarmo
state: armed_night
- condition: state
entity_id: group.family
state: home
sequence:
- service: input_boolean.turn_on
entity_id: input_boolean.dog_mode
- service: script.jarvis_alert
data_template:
message: Turning on Dog Mode.
- service: script.dog_mode_lighting_on
mode:single