Hi,
I’m using the below configuration.yaml file below, when the my_tp_switch_watts is below 1.5, changes the value to true, but the notification via tts is not working. Anyone have any ideas?:
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Text to speech
tts:
- platform: google_translate
language: 'pt'
service_name: google_say
tplink:
sensor:
- platform: template
sensors:
my_tp_switch_watts:
friendly_name: "Máquina de Secar"
#friendly_name_template: "{{ state_attr('switch.maquina_de_secar_roupa','friendly_name') }} Current Consumption"
#value_template: "{{ state_attr('switch.maquina_de_secar_roupa','current_power_w') | float }}"
value_template: "{{ states.switch.maquina_de_secar_roupa.attributes.current_power_w | float <1.5 }}"
unit_of_measurement: 'W'
automation:
- alias: Action - Set Máquina de secar to true
id: '1514637041932'
trigger:
- platform: state
entity_id: sensor.my_tp_switch_watts
from: 'False'
to: 'True'
for:
minutes: 1
- alias: Notify - Máquina de secar terminou
id: '1514634021340'
trigger:
- platform: state
entity_id: sensor.my_tp_switch_watts
to: 'True'
action:
- service: tts.google_say
entity_id: media_player.escritorio
data:
message: "A roupa esta seca"
cache: true
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml