Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this is my musroom chip entity code:
- type: template
- entity: input_select.front_door_lock_status_helper
- icon: >-
- {{ 'mdi:lock' if is_state('input_select.front_door_lock_status_helper',
- 'Locked') else 'mdi:lock-open-outline' }}
- content: |-
- {% if is_state('input_select.front_door_lock_status_helper', 'Pending') %}
- Pending
- {% elif is_state('input_select.front_door_lock_status_helper', 'Locked') %}
- Locked
- {% else %}
- Unlocked
- {% endif %}
- icon_color: >
- {{ 'green' if is_state('input_select.front_door_lock_status_helper', 'Locked')
- else 'red' }}
- tap_action:
- action: call-service
- service: automation.trigger
- target:
- entity_id: automation.lock_front_door_toggle_locking_state
- data:
- skip_condition: true
- the automation:
- alias: Lock - Front Door - Toggle Locking State
- description: Lock service only allows on or off, this allows the toggle
- trigger: []
- condition: []
- action:
- - service: input_select.select_option
- target:
- entity_id:
- - input_select.front_door_lock_status_helper
- data:
- option: Pending
- - if:
- - condition: state
- entity_id: lock.schlage_front_door_lock
- state: unlocked
- then:
- - service: lock.lock
- target:
- device_id: c7beec1bea8c836a7338e68a8f29e002
- data: {}
- - wait_for_trigger:
- - platform: device
- device_id: c7beec1bea8c836a7338e68a8f29e002
- domain: lock
- entity_id: 0c5ed60dd8777fecf9f20a6951c382cf
- type: locked
- timeout:
- hours: 0
- minutes: 0
- seconds: 35
- milliseconds: 0
- - service: input_select.select_option
- target:
- entity_id:
- - input_select.front_door_lock_status_helper
- data:
- option: Locked
- else:
- - if:
- - condition: state
- entity_id: lock.schlage_front_door_lock
- state: locked
- then:
- - service: lock.unlock
- target:
- device_id:
- - c7beec1bea8c836a7338e68a8f29e002
- data: {}
- - wait_for_trigger:
- - platform: device
- device_id: c7beec1bea8c836a7338e68a8f29e002
- domain: lock
- entity_id: 0c5ed60dd8777fecf9f20a6951c382cf
- type: unlocked
- timeout:
- hours: 0
- minutes: 0
- seconds: 35
- milliseconds: 0
- - service: input_select.select_option
- target:
- entity_id:
- - input_select.front_door_lock_status_helper
- data:
- option: Unlocked
- mode: single
Advertisement
Add Comment
Please, Sign In to add comment