Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DivanX10/6c43bcdd3209d0abbb812ce5d0a9ec04 to your computer and use it in GitHub Desktop.
Save DivanX10/6c43bcdd3209d0abbb812ce5d0a9ec04 to your computer and use it in GitHub Desktop.
Home Assistant. Создаем скрипт для отображения сервисных шаблонов
# Колонка произнесёт текст с заданной громкостью и вернёт громкость на прежний уровень.
# Создаем скрипт для отображения сервисных шаблонов
# Интеграция: https://github.com/AlexxIT/YandexStation
# Документация: Passing variables to scripts https://www.home-assistant.io/integrations/script/#passing-variables-to-scripts
tts_yandex_station_say:
alias: TTS Яндекс колонка
fields:
device:
name: Выберите свою колонку
required: true
selector:
entity:
volume:
name: Громкость колонки Яндекс (0...10)
example: 5
required: true
selector:
number:
mode: slider
min: 0
max: 10
message:
name: Голосовое сообщение от колонки Яндекс
example: Укажите любой текст
required: true
selector:
text:
sequence:
- service: tts.yandex_station_say
data:
entity_id: '{{ device }}'
message: '{{ message }}'
options:
volume_level: '{{ volume|int / 10 }}'
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment