Last active
April 2, 2025 01:01
-
-
Save kai-zer-ru/7e34d0a7dbd86e25c0409fb3ce8463cc to your computer and use it in GitHub Desktop.
Пакет скриптов и автоматизация для стиральной машины
This file contains hidden or 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
stirka: | |
timer: | |
alisa_stirka: | |
restore: true | |
duration: "00:30:00" | |
name: Стирка | |
icon: mdi:tshirt-crew | |
input_boolean: | |
washing_machine_status: | |
name: Статус стиральной машины | |
input_number: | |
volume_station: | |
name: Уровень громкости Яндекс станции | |
icon: mdi:tshirt-crew | |
min: 0 | |
max: 100 | |
timer_alisa_stirka: | |
name: Таймер стирки | |
icon: mdi:tshirt-crew | |
min: 10 | |
max: 30 | |
#################################### | |
automation: | |
#################################### | |
- id: stirka_start | |
alias: Стирка | |
description: "" | |
trigger: | |
- type: power | |
platform: device | |
device_id: 12e34fa53d1f5af20e7f63392dfb8494 | |
entity_id: sensor.washing_machine_power | |
domain: sensor | |
above: 10 | |
id: Washing Machine On | |
for: | |
hours: 0 | |
minutes: 0 | |
seconds: 30 | |
- type: power | |
platform: device | |
device_id: 12e34fa53d1f5af20e7f63392dfb8494 | |
entity_id: sensor.washing_machine_power | |
domain: sensor | |
below: 2 | |
id: Washing Machine Off | |
for: | |
hours: 0 | |
minutes: 1 | |
seconds: 0 | |
condition: [] | |
action: | |
- choose: | |
- conditions: | |
- condition: trigger | |
id: | |
- Washing Machine On | |
sequence: | |
- service: input_boolean.turn_on | |
data: {} | |
target: | |
entity_id: input_boolean.washing_machine_status | |
- conditions: | |
- condition: trigger | |
id: | |
- Washing Machine Off | |
- condition: state | |
entity_id: input_boolean.washing_machine_status | |
state: "on" | |
sequence: | |
- service: input_boolean.turn_off | |
data: {} | |
target: | |
entity_id: input_boolean.washing_machine_status | |
- service: script.stirka_stop | |
data: {} | |
mode: single | |
#################################### | |
- id: alisa_timer_stirka | |
alias: Таймер для алисы после стирки | |
description: "" | |
trigger: | |
- platform: event | |
event_type: timer.finished | |
event_data: | |
entity_id: timer.alisa_stirka | |
action: | |
- service: script.stirka_stop | |
data: {} | |
#################################### | |
- id: stop_timer_from_alisa | |
alias: Остановить таймер стиралки | |
description: "" | |
trigger: | |
- platform: event | |
event_type: yandex_intent | |
event_data: | |
text: Стирка | |
condition: [] | |
action: | |
- service: timer.cancel | |
entity_id: timer.alisa_stirka | |
#################################### | |
script: | |
#################################### | |
set_50_volume_station: | |
alias: Установить громкость 50 на станции | |
sequence: | |
- service: input_number.set_value | |
data: | |
value: >- | |
{{ state_attr('media_player.yandex_station_u1111111', | |
'volume_level') * 100 }} | |
target: | |
entity_id: input_number.volume_station | |
- service: media_player.volume_set | |
data: | |
volume_level: 0.5 | |
target: | |
entity_id: media_player.yandex_station_u1111111 | |
#################################### | |
stirka_stop: | |
alias: Конец стирки | |
sequence: | |
- service: timer.cancel | |
entity_id: timer.alisa_stirka | |
- service: timer.start | |
entity_id: timer.alisa_stirka | |
- service: script.set_50_volume_station | |
- service: media_player.play_media | |
target: | |
entity_id: media_player.yandex_station_u1111111 | |
data: | |
media_content_id: Стиралка закончила стирку, пора доставать бельё! | |
media_content_type: text | |
- delay: | |
hours: 0 | |
minutes: 0 | |
seconds: 10 | |
milliseconds: 0 | |
- service: script.reset_volume_station | |
#################################### | |
reset_volume_station: | |
alias: Вернуть громкость на станции | |
sequence: | |
- service: media_player.volume_set | |
data: | |
volume_level: "{{ (states('input_number.volume_station') | int / 100) | round(1) }}" | |
target: | |
entity_id: media_player.yandex_station_u1111111 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment