1
0
ansible-home-assistant/roles/automations/tasks/templates.yml

55 lines
1.4 KiB
YAML

- name: Build lights automations
delegate_to: localhost
template:
src: lights.yaml.j2
dest: './build/automations/lights.yaml'
vars:
lights:
- entityId: light.bathroom_lights
name: Bathroom Lights
- entityId: light.kitchen_lights
name: Kitchen Lights
- entityId: light.shower_lights
name: Shower Lights
- entityId: light.couch_lights
name: Couch Lights
- entityId: light.desk_lightbar
name: Desk Lightbar
- entityId: light.office
name: Table lamp
- name: Build music button automations
delegate_to: localhost
template:
src: music-button.yaml.j2
dest: './build/automations/music.yaml'
vars:
room: Bathroom
room_id: bathroom
device_id: ea9059ad2df037a012ab01a575108dc5
player_entity_id: media_player.bathroom
- name: Build unavailable automations ZHA
delegate_to: localhost
template:
src: unavailable-zha.yaml.j2
dest: './build/automations/unavailable-zha.yaml'
vars:
devices: "{{ zha.devices }}"
- name: Build unavailable automations Z-Wave
delegate_to: localhost
template:
src: unavailable-zwave.yaml.j2
dest: './build/automations/unavailable-zwave.yaml'
vars:
devices: "{{ zwave.devices }}"
- name: Build battery info automations
delegate_to: localhost
template:
src: low-battery.yaml.j2
dest: './build/automations/low-battery.yaml'
vars:
entities: "{{ battery }}"