Advertisement
XeRiZeR

Piktogram

Apr 15th, 2022
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 3.19 KB | None | 0 0
  1. #Automations
  2.  
  3. - id: '5'
  4.   alias: Hård Plast Full
  5.   description: ''
  6.   trigger:
  7.   - platform: state
  8.     entity_id: sensor.pligt_dag
  9.     to: 'on'
  10.   condition:
  11.   - condition: state
  12.     entity_id: person.noah_elias_lauth
  13.     state: home
  14.   - condition: state
  15.     entity_id: calendar.faste_aftaler
  16.     state: 'off'
  17.   - condition: state
  18.     entity_id: sensor.template_todays_pligt
  19.     state: Mandag
  20.   action:
  21.   - service: input_boolean.turn_on
  22.     data: {}
  23.     target:
  24.       entity_id: input_boolean.hard_plast
  25.   - wait_for_trigger:
  26.     - type: motion
  27.       platform: device
  28.       device_id: df24a83b8f225287f848eeeb0cf16a9c
  29.       entity_id: binary_sensor.sensor_occupancy
  30.       domain: binary_sensor
  31.   - service: automation.trigger
  32.     data:
  33.       skip_condition: false
  34.     target:
  35.       entity_id: automation.hard_plast_empty
  36.   mode: single
  37.  
  38. - id: '6'
  39.   alias: Hård Plast Empty
  40.   description: ''
  41.   trigger:
  42.   - platform: state
  43.     entity_id: input_boolean.hard_plast
  44.     to: 'on'
  45.   condition: []
  46.   action:
  47.   - service: input_boolean.turn_on
  48.     data: {}
  49.     target:
  50.       entity_id: input_boolean.hard_plast_empty
  51.   - delay:
  52.       hours: 0
  53.       minutes: 1
  54.       seconds: 12
  55.       milliseconds: 0
  56.   - wait_for_trigger:
  57.     - type: motion
  58.       platform: device
  59.       device_id: df24a83b8f225287f848eeeb0cf16a9c
  60.       entity_id: binary_sensor.sensor_occupancy
  61.       domain: binary_sensor
  62.   - service: input_boolean.turn_off
  63.     data: {}
  64.     target:
  65.       entity_id: input_boolean.hard_plast
  66.   mode: single
  67.  
  68. - id: '7'
  69.   alias: Hård Plast Done
  70.   description: ''
  71.   trigger:
  72.   - platform: state
  73.     entity_id: input_boolean.hard_plast_empty
  74.     to: 'off'
  75.   condition: []
  76.   action:
  77.   - service: switch.turn_on
  78.     data: {}
  79.     target:
  80.       entity_id:
  81.      - switch.noah_pc
  82.       - switch.noah_skaerm
  83.  
  84.  
  85. #Kode til et betinget kort på dashboard
  86.  
  87. type: vertical-stack
  88. cards:
  89.   - type: vertical-stack
  90.     cards:
  91.       - square: false
  92.         columns: 2
  93.         type: grid
  94.         cards:
  95.           - type: custom:mushroom-person-card
  96.             entity: person.noah_elias_lauth
  97.             name: Noah Elias Lauth
  98.             use_entity_picture: true
  99.             hide_state: true
  100.           - type: conditional
  101.             conditions:
  102.               - entity: input_boolean.hard_plast
  103.                 state: 'on'
  104.             card:
  105.               type: picture
  106.               image: https://images2.imgbox.com/a8/ba/c9GesxCv_o.jpg
  107.               tap_action:
  108.                 action: none
  109.               hold_action:
  110.                 action: none
  111.           - type: conditional
  112.             conditions:
  113.               - entity: input_boolean.hard_plast
  114.                 state: 'off'
  115.               - entity: input_boolean.hard_plast_empty
  116.                 state: 'on'
  117.             card:
  118.               type: picture
  119.               image: https://images2.imgbox.com/80/d1/IujR17Zc_o.jpg
  120.               tap_action:
  121.                 action: call-service
  122.                 service: input_boolean.turn_off
  123.                 service_data: {}
  124.                 target:
  125.                   entity_id: input_boolean.hard_plast_empty
  126.               hold_action:
  127.                 action: none
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement