More sensors!

This commit is contained in:
2020-05-31 18:56:39 +03:00
parent f5d6520fb1
commit 0397fcbb42
11 changed files with 87 additions and 43 deletions
@@ -45,8 +45,14 @@ cards:
entity: sensor.front_door_power
- type: custom:battery-entity
entity: sensor.living_room_right_window_power
- type: custom:battery-entity
entity: sensor.bedroom_door_power
- type: custom:battery-entity
entity: sensor.bedroom_left_window_power
- type: custom:battery-entity
entity: sensor.bedroom_right_window_power
- type: custom:battery-entity
entity: sensor.kitchen_window_power
- type: custom:battery-entity
entity: sensor.bedroom_weather_power
- type: custom:battery-entity
@@ -144,12 +144,12 @@
# Living room window
- type: conditional
conditions:
- entity: binary_sensor.living_room_right_window_on_off_wrapper
- entity: binary_sensor.living_room_right_window
state: "on"
elements:
- type: image
image: /local/images/floorplan/transparent.png
entity: binary_sensor.living_room_right_window_on_off_wrapper
entity: binary_sensor.living_room_right_window
style:
width: 7.8%
height: 8.4%
@@ -162,12 +162,12 @@
# Master bedroom window
- type: conditional
conditions:
- entity: binary_sensor.bedroom_right_window_on_off_wrapper
- entity: binary_sensor.bedroom_right_window
state: "on"
elements:
- type: image
image: /local/images/floorplan/transparent.png
entity: binary_sensor.bedroom_right_window_on_off_wrapper
entity: binary_sensor.bedroom_right_window
style:
width: 7.5%
height: 8.2%
@@ -34,12 +34,16 @@
- type: horizontal-stack
cards:
- type: custom:button-card
template: default
entity: binary_sensor.front_door
name: Door
- type: custom:button-card
template:
- default
- with_state_indicator
entity: binary_sensor.motion_2_ias_zone
name: Hallway
name: Motion
variables:
state_indicator_id: automation.lighting_hallway_day_mode_motion_turn_lights_on
- type: custom:button-card
@@ -89,6 +89,10 @@
- type: horizontal-stack
cards:
- type: custom:button-card
template: default
entity: binary_sensor.kitchen_window
name: Window
- type: custom:button-card
template:
- default
@@ -130,7 +130,7 @@
cards:
- type: custom:button-card
template: default
entity: binary_sensor.living_room_right_window_on_off_wrapper
entity: binary_sensor.living_room_right_window
name: Window
- type: custom:button-card
template:
@@ -292,12 +292,12 @@
- type: horizontal-stack
cards:
- type: entity
entity: binary_sensor.front_door_on_off_wrapper
entity: binary_sensor.front_door
- type: entity
entity: binary_sensor.living_room_right_window_on_off_wrapper
entity: binary_sensor.living_room_right_window
name: Living room
- type: entity
entity: binary_sensor.bedroom_right_window_on_off_wrapper
entity: binary_sensor.bedroom_right_window
name: Bedroom
- type: vertical-stack
@@ -154,13 +154,13 @@
cards:
- type: custom:button-card
template: default
entity: binary_sensor.bedroom_right_window_on_off_wrapper
name: Window
entity: binary_sensor.bedroom_door
name: Door
- type: custom:button-card
template:
- default
- with_state_indicator
entity: binary_sensor.motion_2_ias_zone
name: Hallway
variables:
state_indicator_id: automation.lighting_hallway_day_mode_motion_turn_lights_on
template: default
entity: binary_sensor.bedroom_left_window
name: Left window
- type: custom:button-card
template: default
entity: binary_sensor.bedroom_right_window
name: Right window
@@ -34,8 +34,8 @@ automation:
above: 24
- platform: state
entity_id:
- binary_sensor.living_room_right_window_on_off_wrapper
- binary_sensor.bedroom_right_window_on_off_wrapper
- binary_sensor.living_room_right_window
- binary_sensor.bedroom_right_window
from: "on"
to: "off"
condition:
@@ -51,10 +51,10 @@ automation:
entity_id: input_boolean.georgi_home
state: "on"
- condition: state
entity_id: binary_sensor.living_room_right_window_on_off_wrapper
entity_id: binary_sensor.living_room_right_window
state: "off"
- condition: state
entity_id: binary_sensor.bedroom_right_window_on_off_wrapper
entity_id: binary_sensor.bedroom_right_window
state: "off"
- condition: state
entity_id: climate.toshiba_ac
@@ -94,8 +94,8 @@ automation:
- platform: state
entity_id:
- binary_sensor.living_room_right_window_on_off_wrapper
- binary_sensor.bedroom_right_window_on_off_wrapper
- binary_sensor.living_room_right_window
- binary_sensor.bedroom_right_window
from: "off"
to: "on"
condition:
+6 -6
View File
@@ -22,9 +22,9 @@ alexa:
- media_player.living_room
- media_player.bathroom
- binary_sensor.front_door_on_off_wrapper
- binary_sensor.living_room_right_window_on_off_wrapper
- binary_sensor.bedroom_right_window_on_off_wrapper
- binary_sensor.front_door
- binary_sensor.living_room_right_window
- binary_sensor.bedroom_right_window
- sensor.bedroom_weather_temperature
- sensor.bedroom_weather_humidity
@@ -64,11 +64,11 @@ alexa:
name: "Living room Sonos"
media_player.bathroom:
name: "Bathroom Sonos"
binary_sensor.front_door_on_off_wrapper:
binary_sensor.front_door:
name: "Front door"
binary_sensor.living_room_right_window_on_off_wrapper:
binary_sensor.living_room_right_window:
name: "Living room window"
binary_sensor.bedroom_right_window_on_off_wrapper:
binary_sensor.bedroom_right_window:
name: "Bedroom window"
sensor.bedroom_weather_temperature:
name: "Bedroom temperature"
+29 -9
View File
@@ -1,7 +1,7 @@
binary_sensor:
- platform: template
sensors:
living_room_right_window_on_off_wrapper:
living_room_right_window:
friendly_name: Living room window
device_class: window
value_template: "{{ is_state('binary_sensor.living_room_right_window_on_off', 'on') }}"
@@ -11,8 +11,8 @@ binary_sensor:
{% else %} mdi:window-closed-variant
{% endif %}
bedroom_right_window_on_off_wrapper:
friendly_name: Bedroom window
bedroom_right_window:
friendly_name: Bedroom right window
device_class: window
value_template: "{{ is_state('binary_sensor.bedroom_right_window_on_off', 'on') }}"
entity_id: binary_sensor.bedroom_right_window_on_off
@@ -21,6 +21,26 @@ binary_sensor:
{% else %} mdi:window-closed-variant
{% endif %}
bedroom_left_window:
friendly_name: Bedroom left window
device_class: window
value_template: "{{ is_state('binary_sensor.bedroom_left_window_raw', 'on') }}"
entity_id: binary_sensor.bedroom_left_window_raw
icon_template: >
{% if is_state('binary_sensor.bedroom_left_window_raw', 'on') %} mdi:window-open-variant
{% else %} mdi:window-closed-variant
{% endif %}
kitchen_window:
friendly_name: Kitchen window
device_class: window
value_template: "{{ is_state('binary_sensor.kitchen_window_raw', 'on') }}"
entity_id: binary_sensor.kitchen_window_raw
icon_template: >
{% if is_state('binary_sensor.kitchen_window_raw', 'on') %} mdi:window-open-variant
{% else %} mdi:window-closed-variant
{% endif %}
group:
all_windows:
name: All windows
@@ -34,14 +54,14 @@ group:
homeassistant:
customize:
binary_sensor.living_room_right_window_on_off:
friendly_name: Living room window sensor
sensor.living_room_right_window_power:
friendly_name: Living room window battery
binary_sensor.bedroom_right_window_on_off:
friendly_name: Bedroom window sensor
sensor.bedroom_left_window_power:
friendly_name: Bedroom left window battery
sensor.bedroom_right_window_power:
friendly_name: Bedroom window battery
friendly_name: Bedroom right window battery
sensor.kitchen_window_power:
friendly_name: Kitchen window battery
@@ -1,7 +1,7 @@
binary_sensor:
- platform: template
sensors:
front_door_on_off_wrapper:
front_door:
friendly_name: Front door
device_class: door
value_template: "{{ is_state('binary_sensor.front_door_on_off', 'on') }}"
@@ -11,14 +11,24 @@ binary_sensor:
{% else %} mdi:door-closed
{% endif %}
bedroom_door:
friendly_name: Bedroom door
device_class: door
value_template: "{{ is_state('binary_sensor.bedroom_door_raw', 'on') }}"
entity_id: binary_sensor.bedroom_door_raw
icon_template: >
{% if is_state('binary_sensor.bedroom_door_raw', 'on') %} mdi:door-open
{% else %} mdi:door-closed
{% endif %}
#
# ─── CUSTOMIZATION ──────────────────────────────────────────────────────────────
#
homeassistant:
customize:
binary_sensor.front_door_on_off:
friendly_name: Front door sensor
sensor.front_door_power:
friendly_name: Front door battery
sensor.bedroom_door_power:
friendly_name: Bedroom door battery