Skip to content

Instantly share code, notes, and snippets.

@AlexxIT
AlexxIT / yandex_station_telegram_automation.yaml
Created August 30, 2020 19:51
Команды через Telegram на разные станции
automation:
- trigger:
platform: event
event_type: yandex_station_response
action:
service: telegram_bot.send_message
data_template:
target: "{{ trigger.event.data.request_id }}"
message: "{{ trigger.event.data.text }}"
@AlexxIT
AlexxIT / yandex_station_call.md
Last active March 27, 2024 01:46
Звонок на колонку с Алисой

Создаём в Home Assistant карточку для быстрого звонка на колонку.

  1. Можно создать или просто карточку-кнопку:
type: button
icon: 'mdi:phone-classic'
tap_action:
  action: url
  # Яндекс > Устройства > Колонка > Дополнительная информация > Идентификатор устройства (регистр важен)
@AlexxIT
AlexxIT / local_intent.md
Last active February 12, 2024 12:59
Локальные сценарии (интенты) на колонках с Алисой
  • Способ позволяет перехватывать фразы на локальных колонках (и только на них!)
  • Можно узнать, с какой локальной колонки пришёл запрос!
  • Не нужна интеграция с умным домом Яндекса (белый IP и HTTPS)
  • Поддерживает только три разные фразы :(
  • Работает только, если колонка НЕ играет музыку в данный момент
  • Работает только, если у вас есть подписка Яндекса на музыку
  1. Создаём сценарий в умном доме Яндекса:

    Если: Я скажу - любая, нужная вам фраза, например "какая температура в комнате"

@AlexxIT
AlexxIT / yandex_station_status.yaml
Created September 14, 2020 07:56
Отображаем статус Яндекс Станции с помощью умных ламп
yandex_station:
username: myuser
password: mypass
sensor:
- platform: template
sensors:
alice_state:
value_template: "{{ state_attr('media_player.yandex_station_mini', 'alice_state') }}"
# http://www.mosvodokanal.ru/forpeople/waterquality.php
# http://www.mosvodokanal.ru/widget-water.php
sensor:
- platform: rest
resource: http://www.mosvodokanal.ru:10080/webservices/address/qual?code=4
name: mosvodokanal
value_template: '{{ value_json.result.dtto }}'
scan_interval: '12:00:00'
json_attributes_path: $.result
json_attributes:
@AlexxIT
AlexxIT / radio.yaml
Last active June 21, 2023 19:25
Список радиостанций для колонок Яндекса
input_select:
radio:
name: Радио
options: ['-']
icon: mdi:radio
python_script: # https://github.com/AlexxIT/PythonScriptsPro
automation:
trigger:
@AlexxIT
AlexxIT / yandex_station_last_active.yaml
Last active April 25, 2023 06:06
Ответ на intent с последней активной колонки
yandex_station: # мой компонент YandexStation
username: myuser
password: mypass
intents:
Расскажи шутку: # добавьте ваши фразы
yandex_smart_home: # НЕ мой компонент Yandex Smart Home
filter: # не забудьте добавить другие, важные для вас, устройства
include_entities:
- media_player.yandex_intents # этот плеер отвечает за работу `intents`
@AlexxIT
AlexxIT / hass_context.yaml
Created July 28, 2020 10:01
Home Assistant Context Example
automation:
- trigger:
platform: numeric_state
entity_id: switch.sonoff_th
value_template: >-
{% if states.switch.sonoff_th.context.user_id and states.switch.sonoff_th.state == 'on' %}
1{% else %}0{% endif %}
above: 0
action:
service: persistent_notification.create
@AlexxIT
AlexxIT / remove_device.yaml
Created August 30, 2020 09:18
Home Assistant remove Device automation
# custom component: https://github.com/AlexxIT/PythonScriptsPro
python_script:
automation:
trigger:
platform: event
event_type: device_registry_updated
action:
service: python_script.exec
data_template:

Update Zigbee firmware for Neo NAS-WR01B (TS011F) from 68 version to 74 version

  • change host to your gateway IP-address
  • change did to your devices IEEE (lumi. + IEEE without leading zeroes)
  • subdev_url should link to raw.githubusercontent.com
service: xiaomi_gateway3.send_command
data:
 host: 192.168.1.123