diff --git a/homeassistant/groups.yaml b/homeassistant/groups.yaml index c7f9a6c..8db3d78 100755 --- a/homeassistant/groups.yaml +++ b/homeassistant/groups.yaml @@ -1,6 +1,6 @@ -garmin_control: +simple_control: entities: - - lock.front_door + - script.front_door - light.living_room_lights - light.hallway_lights - light.kitchen_lights @@ -8,23 +8,9 @@ garmin_control: - light.toilet_lights - light.office_lights - light.bedroom_lights - - media_player.living_room - - media_player.kitchen - - media_player.bathroom - - media_player.toilet - - media_player.office - - media_player.bedroom - - climate.living_room_ac - - climate.office_ac - - climate.bedroom_ac - - climate.living_room - - climate.kitchen - - climate.bathroom - - climate.office - - climate.bedroom - - climate.kitchen_floor - - climate.bathroom_floor - - climate.toilet_floor + - input_boolean.cool_living_room + - input_boolean.cool_office + - input_boolean.cool_bedroom all_lights: entities: diff --git a/homeassistant/scripts/simple_control.yaml b/homeassistant/scripts/simple_control.yaml new file mode 100644 index 0000000..17a10c0 --- /dev/null +++ b/homeassistant/scripts/simple_control.yaml @@ -0,0 +1,21 @@ +front_door: + alias: Front door + sequence: + - service: script.turn_on + data_template: + entity_id: > + {% if is_state('lock.front_door', 'locked') %} + script.unlock_front_door + {% else %} + script.lock_front_door + {% endif %} + +lock_front_door: + sequence: + - service: lock.lock + entity_id: lock.front_door + +unlock_front_door: + sequence: + - service: lock.unlock + entity_id: lock.front_door