Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - alias: 'Shop Opening'
- id: 'Shop Opening'
- trigger:
- - platform: state
- entity_id: input_select.shop_status
- to: 'Opening'
- condition:
- - condition: state
- entity_id: "input_boolean.shop_stop_automation"
- state: "off"
- - condition: template
- value_template: "{{ (states('input_select.shop_status')) == 'Opening' }}"
- action:
- - wait_for_trigger:
- - platform: state
- entity_id: input_boolean.shop_lock
- to: 'off'
- timeout:
- seconds: 30
- continue_on_timeout: true
- - choose:
- - alias: "Is shop still lock?"
- conditions:
- - condition: state
- entity_id: input_boolean.shop_lock
- state: "on"
- sequence:
- - service: input_select.select_option
- data:
- option: Unauthorize
- target:
- entity_id: input_select.shop_status
- default:
- - service: light.turn_on
- entity_id: light.shop_main_bench
- - service: light.turn_on
- entity_id: light.shop_bays
- - service: media_player.turn_off
- data: {}
- target:
- entity_id: media_player.shop
- - service: media_player.volume_set
- data:
- volume_level: 1
- target:
- entity_id: media_player.shop
- - service: tts.cloud_say
- entity_id: media_player.shop
- data:
- message: The shop is now open.
- - service: media_player.play_media
- entity_id: media_player.shop
- data:
- media_content_id: http://maestro.emfcdn.com/stream_for/k-love/web
- media_content_type: music
- extra:
- title: KLove
- thumb: https://cdn-profiles.tunein.com/s22561/images/bannerx.jpg?t=637102372250000000
- stream_type: live
- - service: input_select.select_option
- data:
- option: Open
- target:
- entity_id: input_select.shop_status
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement