Hey all,
need some help, not sure if this is possible or not.
i have 10 rooms, each room has rads and doors/windows that can be opened.
i want to warn if any rad is on in a room and that rooms door/window is open - so we are not wasting energy!
ive worked this out per room, below.
however is there a better way to do this, without copying this code 10x times?
- alias: Rad On Something Open Alert - Jamie Office
id: jamie_office_rad_door_alert
trigger:
- platform: state
entity_id:
- binary_sensor.jamie_office_door_sensor_contact
to: 'on'
for:
minutes: 1
- platform: state
entity_id:
- sensor.radiator_status_jamie_office
to: 'heating'
condition:
- condition: state
entity_id: binary_sensor.jamie_office_door_sensor_contact
state: 'on'
- condition: state
entity_id: sensor.radiator_status_jamie_office
state: 'heating'
action:
- service: persistent_notification.create
data_template:
message: "Jamie Office Door is open and the Rad is on!"
title: Jamie Office Door open - Rad on!
- service: notify.notify
data_template:
message: "Jamie Office Door is open and the Rad is on!"
title: Jamie Office Door open - Rad on!
- service: notify.alexa_media
data_template:
message: "Jamie Office Door is open and the Rad is on!"
data:
type: announce
method: all
target: media_player.jamie_s_echo_spot