1
0

Little cleanup with vars

This commit is contained in:
Przemek Grondek 2024-08-21 01:22:37 +02:00
parent fbc4fbff10
commit 3ee3e9ab98
7 changed files with 52 additions and 48 deletions

View File

@ -14,12 +14,10 @@
- name: Include ZHA vars
include_vars:
file: vars/zha-devices.yml
name: zha
- name: Include Z-wave vars
include_vars:
file: vars/zwave-devices.yml
name: zwave
- name: Include battery vars
include_vars:
@ -29,6 +27,14 @@
include_vars:
file: vars/availability.yml
- name: Include shopping list
include_vars:
file: vars/shopping-list.yml
- name: Include light list for automations
include_vars:
file: vars/lights-automations.yml
roles:
- automations
- scripts

View File

@ -3,31 +3,3 @@
template:
src: shopping-mobile-actions.yaml.j2
dest: './build/automations/shopping-mobile-actions.yaml'
vars:
shopping_list:
- action: SHOPPING_COFFEE
title: Kawa
- action: SHOPPING_COFFEE_WATER_FILTER
title: Filtr do wody ekspresu
- action: SHOPPING_COFFEE_DESCALER
title: Odkamieniacz do ekspresu
- action: SHOPPING_COFFEE_CLEANING_TABLETS
title: Tabletki czyszczące do ekspresu
- action: SHOPPING_COFFEE_MILK_CLEANER
title: Środek do czyszczenia mleka ekspresu
- action: SHOPPING_BASIL
title: Bazylia
- action: SHOPPING_OREGANO
title: Oregano
- action: SHOPPING_THYMELEAF
title: Tymianek
- action: SHOPPING_WHITE_PEPPER
title: Pieprz biały
- action: SHOPPING_BLACK_PEPPER
title: Pieprz czarny
- action: SHOPPING_SWEET_PEPPER
title: Sweet pepper
- action: SHOPPING_GARLIC
title: Czosnek
- action: SHOPPING_SALT
title: Sól

View File

@ -3,20 +3,6 @@
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
@ -35,7 +21,7 @@
src: unavailable-zha.yaml.j2
dest: './build/automations/unavailable-zha.yaml'
vars:
devices: "{{ zha.devices }}"
devices: "{{ zha_devices }}"
- name: Build unavailable automations Z-Wave
delegate_to: localhost
@ -43,7 +29,7 @@
src: unavailable-zwave.yaml.j2
dest: './build/automations/unavailable-zwave.yaml'
vars:
devices: "{{ zwave.devices }}"
devices: "{{ zwave_devices }}"
- name: Build battery info automations
delegate_to: localhost

View File

@ -0,0 +1,13 @@
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

27
vars/shopping-list.yml Normal file
View File

@ -0,0 +1,27 @@
shopping_list:
- action: SHOPPING_COFFEE
title: Kawa
- action: SHOPPING_COFFEE_WATER_FILTER
title: Filtr do wody ekspresu
- action: SHOPPING_COFFEE_DESCALER
title: Odkamieniacz do ekspresu
- action: SHOPPING_COFFEE_CLEANING_TABLETS
title: Tabletki czyszczące do ekspresu
- action: SHOPPING_COFFEE_MILK_CLEANER
title: Środek do czyszczenia mleka ekspresu
- action: SHOPPING_BASIL
title: Bazylia
- action: SHOPPING_OREGANO
title: Oregano
- action: SHOPPING_THYMELEAF
title: Tymianek
- action: SHOPPING_WHITE_PEPPER
title: Pieprz biały
- action: SHOPPING_BLACK_PEPPER
title: Pieprz czarny
- action: SHOPPING_SWEET_PEPPER
title: Sweet pepper
- action: SHOPPING_GARLIC
title: Czosnek
- action: SHOPPING_SALT
title: Sól

View File

@ -1,4 +1,4 @@
devices:
zha_devices:
- name: 'Bedroom button'
id: '15b083b6b5e2acb5d37fbbfbfc76281f'
- name: 'Bedroom motion'

View File

@ -1,4 +1,4 @@
devices:
zwave_devices:
- name: '3D Printer'
entity_id: 'sensor.3d_printer_node_status'
- name: 'Kitchen tabletop motion'