This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yandex_station: # мой компонент YandexStation | |
username: myuser | |
password: mypass | |
intents: | |
Расскажи шутку: # добавьте ваши фразы | |
yandex_smart_home: # НЕ мой компонент Yandex Smart Home | |
filter: # не забудьте добавить другие, важные для вас, устройства | |
include_entities: | |
- media_player.yandex_intents # этот плеер отвечает за работу `intents` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yandex_station: | |
username: myuser | |
password: mypass | |
sensor: | |
- platform: template | |
sensors: | |
alice_state: | |
value_template: "{{ state_attr('media_player.yandex_station_mini', 'alice_state') }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import sys | |
from os import path | |
from aiohttp import ClientSession | |
from custom_components.yandex_station.yandex_quasar import YandexQuasar | |
async def main(cachefile: str, text: str): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input_select: | |
radio: | |
name: Радио | |
options: ['-'] | |
icon: mdi:radio | |
python_script: # https://github.com/AlexxIT/PythonScriptsPro | |
automation: | |
trigger: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# положи меня /config/custom_components/__init__.py | |
# но лучше не страдай х..нёй и поставь Node-RED | |
import urllib.parse | |
from homeassistant.helpers import template | |
_TemplateEnvironment = template.TemplateEnvironment | |
def unquote(value): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
1. Place file here: /config/custom_components/sonofftest/__init__.py | |
2. Add to configuration.yaml: `sonofftest: 192.168.1.123` (IP of sonoff) | |
3. Block the Sonoff from accessing the Internet | |
4. Restart Sonoff | |
5. Wait Sonoff LED to start blinking (two blinks every 2 seconds) | |
6. Restart HA | |
""" | |
import asyncio | |
import logging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# custom_components/boiler/__init__.py |