I’m using latest versions of HA and ESPhome. I want home assistant to send voice msg to kobi media player when voltage falls below 50v or over 56v. TTS works fine with the kobi media player. I have tried all the blueprints I could find but they seem more confusing than helpful. My esphome yaml files are:
esp32:
board: esp32dev
sensor:
- platform: adc
device_class: battery
pin: GPIO32
name: “VCC44”
update_interval: 15s
filters:
multiply: 75.45
After the multiply filter voltage is usually appx 52 (volts)
I’m just needing a shove to point me in the right direction. Any ideas how to get a tts message when voltage falls below 50?
Ok, I got the automation to send multiple (repeated) TTS by using HA automation visual editor. I just added another “send TTS msg” to media player during triggered voltage event. Still not sure why I could not edit yaml to do this. If only there was a HA coding for dummies book I could buy. The indentations really confuse me.
New “under/over-voltage” code produced entirely by hass automations visual editor. I could not figure out how to use “repeat” to avoid the 2nd separate send TTS msg to media player. But it works.
alias: Low Voltage Warning3 (Duplicate)
description: TTS Msg warning of low solar battery
trigger:
- platform: numeric_state
entity_id: sensor.vcc6_2
below: '50'
- platform: numeric_state
entity_id: sensor.vcc6_2
above: '55'
for:
hours: 0
minutes: 3
seconds: 0
condition: []
action:
- service: media_player.play_media
target:
entity_id: media_player.mpd
data:
media_content_id: >-
media-source://tts/google_translate?message=Warning%2C+warning.+Check+solar+battery%21
media_content_type: provider
metadata:
title: Warning, warning. Check solar battery!
thumbnail: https://brands.home-assistant.io/_/google_translate/logo.png
media_class: app
children_media_class: null
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://tts
- media_content_type: provider
media_content_id: >-
media-source://tts/google_translate?message=Warning%2C+warning.+Check+solar+battery%21
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- service: media_player.play_media
target:
entity_id: media_player.mpd
data:
media_content_id: >-
media-source://tts/google_translate?message=Warning%2C+warning.+Solar+battery+is+above+or+below+limits%21
media_content_type: provider
metadata:
title: Warning, warning. Solar battery is above or below limits!
thumbnail: https://brands.home-assistant.io/_/google_translate/logo.png
media_class: app
children_media_class: null
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://tts
- media_content_type: provider
media_content_id: >-
media-source://tts/google_translate?message=Warning%2C+warning.+Solar+battery+is+above+or+below+limits%21
mode: queued
initial_state: false