Hi: Hope someone can help me. In below two automations, I need to set the volume back to high (many be 0.8) after playing the media. How can I do that here please? I tried few but they all give error when I validate so I think I am not getting the correct handling of this. The issue is as I play this media at lower volume, they remain lower and if I ask Google Home anything then the volume is very soft as a result. I have to give a high volume command first to hear properly. Thank you for the help.
- action:
- alias: Azan
data:
entity_id: media_player.living_room_speaker
media_content_id: http://192.168.1.2:8123/local/azans/azan.mp3
media_content_type: audio/mp3
service: media_extractor.play_media
- data:
entity_id: media_player.living_room_speaker
volume_level: '0.40'
service: media_player.volume_set
alias: Adhan
trigger:
- platform: template
value_template: '{{ as_timestamp(strptime(states("sensor.time_date"), "%H:%M,
%Y-%m-%d")) == as_timestamp(strptime(states("sensor.islamic_prayer_time_dhuhr"),
"%Y-%m-%dT%H:%M:%S")) }}'
- platform: template
value_template: '{{ as_timestamp(strptime(states("sensor.time_date"), "%H:%M,
%Y-%m-%d")) == as_timestamp(strptime(states("sensor.islamic_prayer_time_asr"),
"%Y-%m-%dT%H:%M:%S")) +2700 }}'
- platform: template
value_template: '{{ as_timestamp(strptime(states("sensor.time_date"), "%H:%M,
%Y-%m-%d")) == as_timestamp(strptime(states("sensor.islamic_prayer_time_maghrib"),
"%Y-%m-%dT%H:%M:%S")) +240 }}'
- platform: template
value_template: '{{ as_timestamp(strptime(states("sensor.time_date"), "%H:%M,
%Y-%m-%d")) == as_timestamp(strptime(states("sensor.islamic_prayer_time_isha"),
"%Y-%m-%dT%H:%M:%S")) }}'
id: 9ca0514bf8b1402ab763cdf778ebb183
- action:
- alias: Fajar Azan
data:
entity_id: media_player.living_room_speaker
media_content_id: http://192.168.1.2:8123/local/azans/azanfajar.mp3
media_content_type: audio/mp3
service: media_extractor.play_media
- data:
entity_id: media_player.living_room_speaker
volume_level: '0.20'
service: media_player.volume_set
alias: Fajar Adhan
trigger:
- platform: template
value_template: '{{ as_timestamp(strptime(states("sensor.time_date"), "%H:%M,
%Y-%m-%d")) == as_timestamp(strptime(states("sensor.islamic_prayer_time_fajr"),
"%Y-%m-%dT%H:%M:%S")) }}'
id: 408790ff27bd488eada204a2166c8952
- alias: Restart HA
trigger:
platform: time
at: 01:00:00
action:
- service: homeassistant.restart
id: 858b38330af54550b57292db1d6c9b08
- id: '1576029466626'
alias: A Home
description: ''
trigger:
- entity_id: person.a_ashraf
from: not_home
platform: state
to: home
condition: []
action:
- data:
message: A has reached home
service: notify.yinghome
- id: '1576030193568'
alias: Naheed Home
description: ''
trigger:
- entity_id: person.atique_ashraf
from: not_home
platform: state
to: home
condition: []
action:
- data:
message: Atique has reached home
service: notify.yinghome
- id: '1576030285677'
alias: Mobina Home
description: ''
trigger:
- entity_id: person.m_i
from: not_home
platform: state
to: home
condition: []
action:
- data:
message: M has reached home
service: notify.yinghome
- id: '1576030362693'
alias: F Home
description: ''
trigger:
- entity_id: person.f_ashraf
from: not_home
platform: state
to: home
condition: []
action:
- data:
message: F has reached home
service: notify.yinghome