Skip to content

Commit

Permalink
Merge pull request #459 from kylegordon/sensor-name-changes
Browse files Browse the repository at this point in the history
Rename devices to match Z2M defaults
  • Loading branch information
kylegordon committed Jun 24, 2023
2 parents b947934 + 43a006f commit 60b0e60
Show file tree
Hide file tree
Showing 20 changed files with 205 additions and 94 deletions.
1 change: 1 addition & 0 deletions automation/living_room_sofa_dim.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
alias: Living Room TV dimmer
id: living_room_tv_dimmer
trigger:
- platform: state
entity_id: media_player.living_room_kodi
Expand Down
4 changes: 3 additions & 1 deletion automation/media_playing_night.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
alias: "Media playing at night"
id: media_playing_night
trigger:
- platform: state
entity_id: media_player.living_room_kodi
Expand All @@ -8,7 +10,7 @@ condition:
entity_id: sensor.average_external_light_level
below: 1000
- condition: state
entity_id: binary_sensor.kitchen_motion
entity_id: binary_sensor.kitchen_motion_occupancy
state: "off"
action:
- service: light.turn_off
Expand Down
2 changes: 2 additions & 0 deletions automation/media_stopped_night.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
alias: "Media stopped at night"
id: media_stopped_night
trigger:
- platform: state
entity_id: media_player.living_room_kodi
Expand Down
30 changes: 14 additions & 16 deletions groups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ kitchen:
entities:
- sensor.kitchen_temperature
- sensor.kitchen_esp8266_signal_level
- binary_sensor.kitchen_motion
- sensor.kitchen_motion
- binary_sensor.kitchen_motion_occupancy
- light.kitchen_cabinets
- light.kitchen
- media_player.kitchen
Expand All @@ -40,8 +39,8 @@ front_hall:
- sensor.front_hall_sensor_humidity
- sensor.front_hall_sensor_signal_level
- sensor.front_hall_lightlevel
- binary_sensor.front_hall_motion
- binary_sensor.front_hall_door
- binary_sensor.front_hall_motion_occupancy
- binary_sensor.front_hall_door_contact

living_room:
name: Living Room
Expand All @@ -50,8 +49,7 @@ living_room:
- media_player.living_room_kodi
- media_player.openhome_uuid_4c494e4e_0026_0f22_3637_01475230013f
- switch.tellybox
- binary_sensor.living_room_motion
- sensor.living_room_motion
- binary_sensor.living_room_motion_occupancy
- sensor.living_room_temperature
- sensor.living_room_pressure
- sensor.living_room_humidity
Expand Down Expand Up @@ -94,7 +92,7 @@ ensuite:
name: Ensuite
entities:
- sensor.ensuite_lightlevel
- binary_sensor.ensuite_motion
- binary_sensor.ensuite_motion_occupancy
- light.ensuite_entrance
- light.ensuite_towels
- light.ensuite_shower
Expand All @@ -116,9 +114,9 @@ bedroom_2:
name: Guest bedroom
entities:
- light.guest_bedroom
- sensor.guest_room_temperature
- sensor.guest_room_pressure
- sensor.guest_room_humidity
- sensor.guest_room_multi_sensor_temperature
- sensor.guest_room_multi_sensor_pressure
- sensor.guest_room_multi_sensor_humidity

bedroom_3:
name: Study
Expand Down Expand Up @@ -171,14 +169,14 @@ hall_view:
name: Hall
entities:
- light.hall
- binary_sensor.hall_rooms_motion
- binary_sensor.hall_rooms_motion_occupancy
- sensor.hall_rooms_motion
- binary_sensor.hall_door_motion
- binary_sensor.boot_room_motion
- binary_sensor.hall_door_motion_occupancy
- binary_sensor.boot_room_motion_occupancy
- sensor.hall_door_motion
- sensor.hall_temperature
- sensor.hall_humidity
- sensor.hall_pressure
- sensor.hallway_multi_sensor_temperature
- sensor.hallway_multi_sensor_humidity
- sensor.hallway_multi_sensor_pressure
- binary_sensor.boot_room_door

outside:
Expand Down
2 changes: 1 addition & 1 deletion packages/bin_reminder_tts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ automation:
state: 'on'
trigger:
- platform: state
entity_id: binary_sensor.front_hall_door
entity_id: binary_sensor.front_hall_door_contact
to: 'on'
- platform: state
entity_id: binary_sensor.front_hall_motion
Expand Down
8 changes: 4 additions & 4 deletions packages/boot_room.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ automation:
initial_state: true
trigger:
- platform: state
entity_id: binary_sensor.boot_room_motion
entity_id: binary_sensor.boot_room_motion_occupancy
to: 'on'
from: 'off'
# Sensor attached to wrong door at the moment...
Expand Down Expand Up @@ -83,7 +83,7 @@ automation:
initial_state: true
trigger:
- platform: state
entity_id: binary_sensor.boot_room_motion
entity_id: binary_sensor.boot_room_motion_occupancy
to: 'on'
from: 'off'
# Sensor attached to wrong door at the moment...
Expand Down Expand Up @@ -114,7 +114,7 @@ automation:
- alias: Boot room motion - 2 minute timeout
trigger:
- platform: state
entity_id: binary_sensor.boot_room_motion
entity_id: binary_sensor.boot_room_motion_occupancy
to: 'off'
for:
minutes: 2
Expand All @@ -136,7 +136,7 @@ automation:
- alias: Boot room motion - 10 minute timeout
trigger:
- platform: state
entity_id: binary_sensor.boot_room_motion
entity_id: binary_sensor.boot_room_motion_occupancy
to: 'off'
for:
minutes: 10
Expand Down
16 changes: 8 additions & 8 deletions packages/device_alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ automation:
- sensor.kitchen_temperature
- binary_sensor.front_hall_sensor_status
- sensor.garage_temperature
- binary_sensor.hall_door_motion
- binary_sensor.hall_rooms_motion
- binary_sensor.ensuite_motion
- binary_sensor.living_room_motion
- binary_sensor.kitchen_motion
- binary_sensor.front_hall_motion
- binary_sensor.hallway_bathroom_occupancy
- binary_sensor.hallway_rooms_occupancy
- binary_sensor.ensuite_motion_occupancy
- binary_sensor.living_room_motion_occupancy
- binary_sensor.kitchen_motion_occupancy
- binary_sensor.front_hall_motion_occupancy
- binary_sensor.front_door_motion
- binary_sensor.washing_machine_power_plug_status
- binary_sensor.dishwasher_power_plug_status
Expand All @@ -25,7 +25,7 @@ automation:
- binary_sensor.master_bedroom_window
- binary_sensor.study_window
- binary_sensor.garden_door
- binary_sensor.boot_room_motion
- binary_sensor.boot_room_motion_occupancy
- binary_sensor.boot_room_door
- binary_sensor.bathroom_window
- binary_sensor.dining_table_window
Expand Down Expand Up @@ -58,7 +58,7 @@ automation:
- sensor.living_room_multi_sensor_battery_level
- sensor.master_bedroom_multi_sensor_battery_level
- sensor.study_multi_sensor_battery_level
- sensor.hall_multi_sensor_battery_level
- sensor.hallway_multi_sensor_battery_level
- sensor.dining_nook_multi_sensor_battery_level
- sensor.bathroom_multi_sensor_battery_level
to: 'unavailable'
Expand Down
6 changes: 3 additions & 3 deletions packages/ensuite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ automation:
- alias: Ensuite motion
trigger:
- platform: state
entity_id: binary_sensor.ensuite_motion
entity_id: binary_sensor.ensuite_motion_occupancy
to: 'on'
from: 'off'
action:
Expand Down Expand Up @@ -135,7 +135,7 @@ automation:
- alias: Ensuite motion - night timeout
trigger:
- platform: state
entity_id: binary_sensor.ensuite_motion
entity_id: binary_sensor.ensuite_motion_occupancy
to: 'off'
for:
minutes: 2
Expand All @@ -153,7 +153,7 @@ automation:
- alias: Ensuite motion - regular timeout
trigger:
- platform: state
entity_id: binary_sensor.ensuite_motion
entity_id: binary_sensor.ensuite_motion_occupancy
to: 'off'
for:
minutes: 10
Expand Down
11 changes: 7 additions & 4 deletions packages/front_hall.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ input_number:

automation:
- alias: Front hall motion
id: front_hall_motion
trigger:
- platform: state
entity_id:
- binary_sensor.front_hall_door
- binary_sensor.front_hall_motion
- binary_sensor.front_hall_door_contact
- binary_sensor.front_hall_motion_occupancy
to: 'on'
from: 'off'
condition:
Expand All @@ -37,9 +38,10 @@ automation:
- light.front_hall

- alias: Front hall - 2 minute timeout
id: front_hall_motion_2_minute
trigger:
- platform: state
entity_id: binary_sensor.front_hall_motion
entity_id: binary_sensor.front_hall_motion_occupancy
to: 'off'
for:
minutes: 2
Expand All @@ -58,9 +60,10 @@ automation:
entity_id: light.front_hall

- alias: Front hall - 10 minute timeout
id: front_hall_motion_10_minute
trigger:
- platform: state
entity_id: binary_sensor.front_hall_motion
entity_id: binary_sensor.front_hall_motion_occupancy
to: 'off'
for:
minutes: 10
Expand Down
4 changes: 2 additions & 2 deletions packages/garage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ automation:
initial_state: true
trigger:
- platform: state
entity_id: binary_sensor.garage_motion
entity_id: binary_sensor.garage_motion_occupancy
to: 'on'
from: 'off'
action:
Expand All @@ -14,7 +14,7 @@ automation:
- alias: Garage motion - 10 minute timeout
trigger:
- platform: state
entity_id: binary_sensor.garage_motion
entity_id: binary_sensor.garage_motion_occupancy
to: 'off'
for:
minutes: 10
Expand Down
12 changes: 6 additions & 6 deletions packages/hallway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ automation:
trigger:
- platform: state
entity_id:
- binary_sensor.hall_door_motion
- binary_sensor.hall_rooms_motion
- binary_sensor.hallway_rooms_occupancy
- binary_sensor.hallway_bathroom_occupancy
to: 'on'
from: 'off'
condition:
Expand All @@ -65,8 +65,8 @@ automation:
trigger:
- platform: state
entity_id:
- binary_sensor.hall_door_motion
- binary_sensor.hall_rooms_motion
- binary_sensor.hallway_rooms_occupancy
- binary_sensor.hallway_bathroom_occupancy
to: 'off'
for:
minutes: 2
Expand All @@ -87,8 +87,8 @@ automation:
trigger:
- platform: state
entity_id:
- binary_sensor.hall_door_motion
- binary_sensor.hall_rooms_motion
- binary_sensor.hallway_rooms_occupancy
- binary_sensor.hallway_bathroom_occupancy
to: 'off'
for:
minutes: 10
Expand Down
4 changes: 2 additions & 2 deletions packages/kitchen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ automation:
- alias: Kitchen motion
trigger:
platform: state
entity_id: binary_sensor.kitchen_motion
entity_id: binary_sensor.kitchen_motion_occupancy
to: 'on'
from: 'off'
condition:
Expand All @@ -31,7 +31,7 @@ automation:
- alias: Kitchen motion - 10 minute timeout
trigger:
platform: state
entity_id: binary_sensor.kitchen_motion
entity_id: binary_sensor.kitchen_motion_occupancy
to: 'off'
for:
minutes: 10
Expand Down
16 changes: 10 additions & 6 deletions packages/living_room_lights.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ light:

automation:
- alias: Living room light toggle
id: living_room_light_toggle
# Can be improved, examples at https://github.com/TheFes/HA-configuration/blob/main/include/automation/01_first_floor/floris/shelly_floris.yaml
trigger:
- platform: event
Expand All @@ -60,6 +61,7 @@ automation:
message: "Toggling living room lights"

- alias: Dining nook light toggle
id: dining_nook_light_toggle
# Can be improved, examples at https://github.com/TheFes/HA-configuration/blob/main/include/automation/01_first_floor/floris/shelly_floris.yaml
trigger:
- platform: event
Expand All @@ -74,16 +76,17 @@ automation:
- service: light.toggle
data_template:
entity_id:
- light.dining_nook_group
- light.dining_nook
- service: logbook.log
data_template:
name: EVENT
message: "Toggling dining nook lights"

- alias: Living Room motion - motion timeout
id: living_room_motion_timeout
trigger:
- platform: state
entity_id: binary_sensor.living_room_motion
entity_id: binary_sensor.living_room_motion_occupancy
to: 'off'
for:
minutes: 60
Expand All @@ -103,9 +106,10 @@ automation:
entity_id: light.living_room, light.dining_nook_group

- alias: Living Room motion
id: living_room_motion
trigger:
- platform: state
entity_id: binary_sensor.living_room_motion
entity_id: binary_sensor.living_room_motion_occupancy
to: 'on'
from: 'off'
condition:
Expand All @@ -118,7 +122,7 @@ automation:
entity_id: light.living_room
state: "off"
- condition: state
entity_id: light.dining_nook_group
entity_id: light.dining_nook
state: "off"
- condition: numeric_state
entity_id: sensor.average_external_light_level
Expand Down Expand Up @@ -147,7 +151,7 @@ automation:
data_template:
entity_id: >
{% if states('sensor.time_of_day') == "Morning" %}
light.living_room, light.dining_nook_group
light.living_room, light.dining_nook
{% else %}
light.living_room, light.dining_nook_group
light.living_room, light.dining_nook
{% endif %}
2 changes: 1 addition & 1 deletion packages/master_bathroom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ binary_sensor:
{% else %}
mdi:window-closed
{% endif %}
value_template: "{{ is_state('binary_sensor.bathroom_window_opening_sensor','on') or is_state('binary_sensor.bathroom_window_vibration','on') }}"
value_template: "{{ is_state('binary_sensor.bathroom_window_contact','on') or is_state('binary_sensor.bathroom_window_vibration','on') }}"

light:
- platform: group
Expand Down
Loading

0 comments on commit 60b0e60

Please sign in to comment.