Add Mailbox Automations
This commit is contained in:
parent
ca27869935
commit
9f99de4509
0
configuration.yaml
Executable file → Normal file
0
configuration.yaml
Executable file → Normal file
@ -16,6 +16,26 @@
|
||||
name: Temp
|
||||
color: "green"
|
||||
|
||||
- type: 'custom:button-card'
|
||||
color_type: icon
|
||||
entity: switch.mailbox
|
||||
name: Mailbox
|
||||
tap_action: none
|
||||
show_label: true
|
||||
size: 20%
|
||||
state:
|
||||
- operator: template
|
||||
value: >
|
||||
[[[ return states['switch.mailbox'].state === 'on' ]]]
|
||||
icon: mdi:mailbox
|
||||
label: Mail
|
||||
- operator: default
|
||||
icon: mdi:mailbox-outline
|
||||
label: No Mail
|
||||
|
||||
|
||||
|
||||
|
||||
- type: horizontal-stack
|
||||
cards:
|
||||
- type: "custom:button-card"
|
||||
@ -37,21 +57,4 @@
|
||||
- type: custom:weather-card
|
||||
entity: weather.pirateweather
|
||||
|
||||
- type: vertical-stack
|
||||
cards:
|
||||
- type: 'custom:valetudo-map-card'
|
||||
vacuum: 'valetudo_kunibert'
|
||||
title:
|
||||
show_status: false
|
||||
show_battery_level: false
|
||||
show_start_button: false
|
||||
show_pause_button: false
|
||||
show_stop_button: false
|
||||
show_home_button: false
|
||||
show_locate_button: false
|
||||
|
||||
- type: 'custom:button-card'
|
||||
template: "card_vacuum"
|
||||
entity: 'vacuum.valetudo_kunibert'
|
||||
|
||||
|
||||
|
21
lovelace/dashboard/kunibert.yaml
Executable file
21
lovelace/dashboard/kunibert.yaml
Executable file
@ -0,0 +1,21 @@
|
||||
- type: 'custom:button-card'
|
||||
template: card_title
|
||||
name: Kunibert
|
||||
label: information
|
||||
|
||||
- type: vertical-stack
|
||||
cards:
|
||||
- type: 'custom:valetudo-map-card'
|
||||
vacuum: 'valetudo_kunibert'
|
||||
title:
|
||||
show_status: false
|
||||
show_battery_level: false
|
||||
show_start_button: false
|
||||
show_pause_button: false
|
||||
show_stop_button: false
|
||||
show_home_button: false
|
||||
show_locate_button: false
|
||||
|
||||
- type: 'custom:button-card'
|
||||
template: "card_vacuum"
|
||||
entity: 'vacuum.valetudo_kunibert'
|
@ -1,5 +1,6 @@
|
||||
adaptive_lighting:
|
||||
min_brightness: 35
|
||||
transition: 0
|
||||
lights:
|
||||
- light.office_bulb
|
||||
- light.bedroom_bulb_light
|
53
packages/mailbox/mailbox_received.yaml
Executable file
53
packages/mailbox/mailbox_received.yaml
Executable file
@ -0,0 +1,53 @@
|
||||
automation:
|
||||
- alias: mailbox_mail_received
|
||||
mode: single
|
||||
trigger:
|
||||
- device_id: ca819ab69f4c9e16861daf8ffacdd10e
|
||||
entity_id: binary_sensor.mailbox_motion_iaszone
|
||||
domain: binary_sensor
|
||||
platform: device
|
||||
type: motion
|
||||
condition:
|
||||
- type: is_not_open
|
||||
condition: device
|
||||
device_id: 6649a68ae459ea3e7f61eb4155ffe23d
|
||||
entity_id: binary_sensor.mailbox_door_iaszone
|
||||
domain: binary_sensor
|
||||
action:
|
||||
- service: notify.notify
|
||||
data:
|
||||
title: Post
|
||||
message: ist da.
|
||||
- service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.mailbox
|
||||
- service: scene.create
|
||||
data:
|
||||
scene_id: before
|
||||
snapshot_entities:
|
||||
- light.office_bulb
|
||||
- delay:
|
||||
seconds: 2
|
||||
- service: scene.create
|
||||
data:
|
||||
scene_id: after
|
||||
snapshot_entities:
|
||||
- switch.adaptive_lighting_default
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.adaptive_lighting_default
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.office_bulb
|
||||
data:
|
||||
color_name: blue
|
||||
- delay:
|
||||
seconds: 15
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.before
|
||||
- delay:
|
||||
seconds: 1
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.after
|
51
packages/mailbox/mailbox_taken_out.yaml
Executable file
51
packages/mailbox/mailbox_taken_out.yaml
Executable file
@ -0,0 +1,51 @@
|
||||
automation:
|
||||
- alias: mailbox_mail_taken_out
|
||||
mode: single
|
||||
trigger:
|
||||
- device_id: 6649a68ae459ea3e7f61eb4155ffe23d
|
||||
entity_id: binary_sensor.mailbox_door_iaszone
|
||||
domain: binary_sensor
|
||||
platform: device
|
||||
type: opened
|
||||
action:
|
||||
- service: notify.notify
|
||||
data:
|
||||
title: Post
|
||||
message: ist aus dem Briefkasten geholt.
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.mailbox
|
||||
- service: scene.create
|
||||
data:
|
||||
scene_id: before
|
||||
snapshot_entities:
|
||||
- light.office_bulb
|
||||
- automation.mailbox_mail_received
|
||||
- service: automation.turn_off
|
||||
target:
|
||||
entity_id: automation.mailbox_mail_received
|
||||
- service: scene.create
|
||||
data:
|
||||
scene_id: after
|
||||
snapshot_entities:
|
||||
- switch.adaptive_lighting_default
|
||||
- delay:
|
||||
seconds: 2
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.adaptive_lighting_default
|
||||
- service: light.turn_on
|
||||
target:
|
||||
entity_id: light.office_bulb
|
||||
data:
|
||||
color_name: red
|
||||
- delay:
|
||||
seconds: 15
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.before
|
||||
- delay:
|
||||
seconds: 1
|
||||
- service: scene.turn_on
|
||||
target:
|
||||
entity_id: scene.after
|
19
packages/mailbox/switch.yaml
Executable file
19
packages/mailbox/switch.yaml
Executable file
@ -0,0 +1,19 @@
|
||||
# Example configuration.yaml entry
|
||||
switch:
|
||||
- platform: template
|
||||
switches:
|
||||
mailbox:
|
||||
turn_on:
|
||||
service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.mailbox
|
||||
turn_off:
|
||||
service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.mailbox
|
||||
icon_template: >
|
||||
{% if is_state('switch.mailbox', 'on') %}
|
||||
mdi:mailbox
|
||||
{% else %}
|
||||
mdi:mailbox-outline
|
||||
{% endif %}
|
@ -25,3 +25,11 @@ views:
|
||||
type: vertical-stack
|
||||
cards:
|
||||
!include lovelace/dashboard/sensors.yaml
|
||||
- type: custom:vertical-layout
|
||||
title: "Kunibert"
|
||||
path: 1
|
||||
cards:
|
||||
- type: custom:vertical-layout
|
||||
type: vertical-stack
|
||||
cards:
|
||||
!include lovelace/dashboard/kunibert.yaml
|
Loading…
Reference in New Issue
Block a user