Guest User

Home Assistant washing machine automation

a guest
Mar 29th, 2021
809
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 4.45 KB | None | 0 0
  1. - alias: washing_machine_mode
  2.   initial_state: true
  3.   trigger:
  4.     - platform: state
  5.       entity_id: binary_sensor.washing_machine
  6.     - platform: state
  7.       entity_id: binary_sensor.bathroom_washing_machine_door
  8.   action:
  9.       - choose:
  10.           - conditions:
  11.               - condition: state
  12.                 entity_id: binary_sensor.washing_machine
  13.                 state: 'on'
  14.               - condition: state
  15.                 entity_id: input_select.washing_machine_state
  16.                 state: 'Stopped'
  17.             sequence:
  18.               - service: input_select.select_option
  19.                 data:
  20.                   entity_id: input_select.washing_machine_state
  21.                   option: Washing
  22.               - service: notify.telegram_1
  23.                 data:
  24.                   title: '*Ванная*'
  25.                   message: "\U0001F97C\U0001F455\U0001F456\U0001F9E5\U0001F9E6\U0001F457\U0001F459\U0001F45A
  26.                            \nСтиральная машина начала стирку!"
  27.               - service: notify.telegram_2
  28.                 data:
  29.                   title: '*Ванная*'
  30.                   message: "\U0001F97C\U0001F455\U0001F456\U0001F9E5\U0001F9E6\U0001F457\U0001F459\U0001F45A
  31.                            \nСтиральная машина начала стирку!"
  32.               - service: script.turn_on
  33.                 entity_id: script.tts_bathroom_washing_machine_start
  34.           - conditions:
  35.               - condition: state
  36.                 entity_id: binary_sensor.washing_machine
  37.                 state: 'off'
  38.               - condition: state
  39.                 entity_id: binary_sensor.bathroom_washing_machine_door
  40.                 state: 'off'
  41.               - condition: state
  42.                 entity_id: input_select.washing_machine_state
  43.                 state: 'Washing'
  44.             sequence:
  45.               - service: input_select.select_option
  46.                 data:
  47.                   entity_id: input_select.washing_machine_state
  48.                   option: Drying
  49.               - service: notify.telegram_1
  50.                 data:
  51.                   title: '*Ванная*'
  52.                   message: "\U0001F97C\U0001F455\U0001F456\U0001F9E5\U0001F9E6\U0001F457\U0001F459\U0001F45A
  53.                            \nСтирка завершена, пожалуйста извлеките и развесьте вещи для сушки."
  54.               - service: notify.telegram_2
  55.                 data:
  56.                   title: '*Ванная*'
  57.                   message: "\U0001F97C\U0001F455\U0001F456\U0001F9E5\U0001F9E6\U0001F457\U0001F459\U0001F45A
  58.                            \nСтирка завершена, пожалуйста извлеките и развесьте вещи для сушки."
  59.               - service: script.turn_on
  60.                 entity_id: script.tts_bathroom_washing_machine_drying
  61.           - conditions:
  62.               - condition: state
  63.                 entity_id: binary_sensor.bathroom_washing_machine_door
  64.                 state: 'on'
  65.               - condition: or
  66.                 conditions:
  67.                   - condition: state
  68.                     entity_id: input_select.washing_machine_state
  69.                     state: 'Drying'
  70.                   - condition: state
  71.                     entity_id: input_select.washing_machine_state
  72.                     state: 'Washing'
  73.             sequence:
  74.               - service: input_select.select_option
  75.                 data:
  76.                   entity_id: input_select.washing_machine_state
  77.                   option: Stopped
  78.               - service: switch.turn_off
  79.                 entity_id: switch.bathroom_washing_machine
  80.               - service: notify.telegram_1
  81.                 data:
  82.                   title: '*Ванная*'
  83.                   message: "\U0001F97C\U0001F455\U0001F456\U0001F9E5\U0001F9E6\U0001F457\U0001F459\U0001F45A
  84.                            \nВещи извлечены из стиральной машины для сушки.\nПитание стиральной машины отключено."
  85.               - service: notify.telegram_2
  86.                 data:
  87.                   title: '*Ванная*'
  88.                   message: "\U0001F97C\U0001F455\U0001F456\U0001F9E5\U0001F9E6\U0001F457\U0001F459\U0001F45A
  89.                            \nВещи извлечены из стиральной машины для сушки.\nПитание стиральной машины отключено."
Advertisement
Add Comment
Please, Sign In to add comment