mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-02-15 06:09:10 +00:00
Closes #145 - Added psuedo speechcons to TTS.
This commit is contained in:
parent
4df31fd083
commit
9cb3781ac0
@ -19,3 +19,6 @@
|
||||
- group.living_room_lights
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.meal_time
|
||||
- service: script.speechcon
|
||||
data_template:
|
||||
speechcon: "bon_appetit"
|
||||
|
@ -28,8 +28,6 @@ input_boolean.garage_check:
|
||||
hidden: False
|
||||
|
||||
|
||||
|
||||
|
||||
input_boolean.good_morning:
|
||||
friendly_name: 'Good Morning'
|
||||
emulated_hue: True
|
||||
|
48
script/speechcons.yaml
Executable file
48
script/speechcons.yaml
Executable file
@ -0,0 +1,48 @@
|
||||
######################################################################################################
|
||||
###Script to send notifications to the ChromeCast Audios during normal hours and only when we are home! Call like this:
|
||||
# action:
|
||||
# service: script.speechcons
|
||||
# data_template:
|
||||
# speechcon: 'Bazinga'
|
||||
# @CCOSTAN
|
||||
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
||||
######################################################################################################
|
||||
|
||||
speechcon:
|
||||
sequence:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{% if is_state('media_player.livingroomCC', 'playing') %}
|
||||
false
|
||||
{% else %}
|
||||
true
|
||||
{% endif %}
|
||||
- condition: state
|
||||
entity_id: input_boolean.speech_notifications
|
||||
state: 'on'
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.living_room_amp
|
||||
|
||||
- service: media_player.turn_on
|
||||
entity_id: media_player.livingroomCC
|
||||
|
||||
- service: media_player.volume_set
|
||||
entity_id:
|
||||
- media_player.livingroomCC
|
||||
data_template:
|
||||
volume_level: >
|
||||
{% if now().strftime("%H")|int < 12 and now().strftime("%H")|int > 6%}
|
||||
0.3
|
||||
{% elif now().strftime("%H")|int > 12 and now().strftime("%H")|int < 17%}
|
||||
0.65
|
||||
{% else %}
|
||||
0.30
|
||||
{% endif %}
|
||||
|
||||
- service: media_player.play_media
|
||||
entity_id:
|
||||
- media_player.LivingRoomCCa
|
||||
data_template:
|
||||
media_content_id: >
|
||||
"https://raw.githubusercontent.com/CCOSTAN/Home-AssistantConfig/master/sounds/speechcons/{{speechcon}}._TTH_.wav"
|
||||
media_content_type: audio/mp4
|
@ -105,14 +105,14 @@ voice_notify:
|
||||
{%- macro uv_rays() -%}
|
||||
{% if now().strftime("%H")|int < 8 and now().strftime("%H")|int > 14%}
|
||||
{% if state.sensor.uv_index.states|int <= 4 %}
|
||||
The U V index today will be very mild today.
|
||||
The U V index today will be very mild today. {{states('sensor.uv_sun_advice')}}
|
||||
{% elif states.sensor.uv_index.state|int > 4 and states.sensor.uv_index.state|int <=7 %}
|
||||
The U V index will be {{states('sensor.uv_index')}} today. This is considered high.
|
||||
Be sure to drink lots of water and put on suntan lotion if you will be in the sun.
|
||||
{% elif states.sensor.uv_index.state|int > 7 and states.sensor.uv_index.state|int <=10 %}
|
||||
The U V index will be {{states(sensor.uv_index)}} today. This is considered very high.
|
||||
Be sure to drink lots of water and put on suntan lotion often today.
|
||||
You could get a sunburn in about {{states('sensor.uv_burn_time')}}
|
||||
You could get a sunburn in about {{states('sensor.uv_burn_time')}} minutes.
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{%- endmacro -%}
|
||||
@ -194,8 +194,8 @@ voice_notify:
|
||||
{%endif%}
|
||||
|
||||
{{ value1 }}
|
||||
{{iss()}}
|
||||
{{pihole()}}
|
||||
{{ iss() }}
|
||||
{{ pihole() }}
|
||||
</speak>
|
||||
cache: true
|
||||
|
||||
|
BIN
sounds/speechcons/bon_appetit._TTH_.mp3
Executable file
BIN
sounds/speechcons/bon_appetit._TTH_.mp3
Executable file
Binary file not shown.
BIN
sounds/speechcons/ouch._TTH_.mp3
Executable file
BIN
sounds/speechcons/ouch._TTH_.mp3
Executable file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user