diff --git a/Makefile b/Makefile index 7befaf8..9190761 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: default all ui-minimalist config sensors automations +.PHONY: default all ui-minimalist config sensors automations lights NAMESPACE := home-assistant POD_ID := $(shell kubectl -n home-assistant get pod --selector=app.kubernetes.io/name=home-assistant --template "{{range .items}}{{.metadata.name}}{{\"\n\"}}{{end}}") @@ -6,7 +6,7 @@ CONFIG_FILES := configuration.yaml secrets.yaml input_boolean.yaml ui-lovelace.y default: all -all: ui-minimalist config sensors automations +all: ui-minimalist config sensors automations lights config: for FILE in $(CONFIG_FILES); do \ @@ -21,3 +21,6 @@ sensors: automations: kubectl cp automations $(NAMESPACE)/$(POD_ID):/config + +lights: + kubectl cp lights $(NAMESPACE)/$(POD_ID):/config diff --git a/configuration.yaml b/configuration.yaml index 290a38e..a12a828 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -86,6 +86,7 @@ script: !include scripts.yaml scene: !include scenes.yaml input_boolean: !include input_boolean.yaml sensor: !include_dir_merge_list sensors +light: !include_dir_merge_list lights frontend: themes: !include_dir_merge_named themes diff --git a/lights/diningroom.yaml b/lights/diningroom.yaml new file mode 100644 index 0000000..ab5b95b --- /dev/null +++ b/lights/diningroom.yaml @@ -0,0 +1,9 @@ +- platform: mqtt + schema: json + unique_id: matsal + name: matsal + command_topic: "zigbee2mqtt/light_dinnertable/set" + state_topic: "zigbee2mqtt/light_dinnertable" + color_temp: true + brightness: true + rgb: true diff --git a/ui_lovelace_minimalist/dashboard/ui-lovelace.yaml b/ui_lovelace_minimalist/dashboard/ui-lovelace.yaml index bca1314..a6bdf16 100644 --- a/ui_lovelace_minimalist/dashboard/ui-lovelace.yaml +++ b/ui_lovelace_minimalist/dashboard/ui-lovelace.yaml @@ -10,3 +10,4 @@ views: - !include views/kitchen.yaml - !include views/shoppinglist.yaml - !include views/transport.yaml + - !include views/diningroom.yaml diff --git a/ui_lovelace_minimalist/dashboard/views/diningroom.yaml b/ui_lovelace_minimalist/dashboard/views/diningroom.yaml new file mode 100644 index 0000000..0c88614 --- /dev/null +++ b/ui_lovelace_minimalist/dashboard/views/diningroom.yaml @@ -0,0 +1,44 @@ +title: "matsal" +path: "diningroom" +cards: + - type: horizontal-stack + cards: + - type: "custom:button-card" + template: chip_back + variables: + ulm_chip_back_path: home + - type: "custom:button-card" + template: card_title + name: Matsal + - type: horizontal-stack + cards: + - type: "custom:button-card" + template: card_light + entity: light.matsal + variables: + ulm_card_light_name: Matsal + ulm_card_light_enable_collapse: true + ulm_card_light_enable_slider: false + ulm_card_light_enable_color: true + ulm_card_light_force_background_color: false + + - type: horizontal-stack + cards: + - type: "custom:button-card" + template: card_light + entity: light.light_dinner_table_1 + variables: + ulm_card_light_name: Lampa-1 + ulm_card_light_enable_collapse: true + ulm_card_light_enable_slider: false + ulm_card_light_enable_color: true + ulm_card_light_force_background_color: false + - type: "custom:button-card" + template: card_light + entity: light.light_dinner_table_2 + variables: + ulm_card_light_name: Lampa-2 + ulm_card_light_enable_collapse: true + ulm_card_light_enable_slider: false + ulm_card_light_enable_color: true + ulm_card_light_force_background_color: false diff --git a/ui_lovelace_minimalist/dashboard/views/home.yaml b/ui_lovelace_minimalist/dashboard/views/home.yaml index 9d6d6df..a7b0013 100644 --- a/ui_lovelace_minimalist/dashboard/views/home.yaml +++ b/ui_lovelace_minimalist/dashboard/views/home.yaml @@ -103,9 +103,20 @@ cards: variables: ulm_custom_card_esh_room_light_entity: light.light_livinroom_1 ulm_custom_card_esh_room_climate_entity: - - type: grid - columns: 2 + - type: horizontal-stack cards: + - type: "custom:button-card" + template: + - card_esh_room + - yellow_on + name: Matsal + icon: mdi:pasta + tap_action: + action: navigate + navigation_path: "diningroom" + variables: + ulm_custom_card_esh_room_light_entity: light.matsal + ulm_custom_card_esh_room_climate_entity: - type: "custom:button-card" template: - card_esh_room