Skip to content

Commit

Permalink
adding makeup cover
Browse files Browse the repository at this point in the history
  • Loading branch information
dmatik committed Nov 29, 2023
1 parent 7d54e79 commit b2c8c9d
Show file tree
Hide file tree
Showing 9 changed files with 186 additions and 64 deletions.
1 change: 1 addition & 0 deletions homeassistant/config/lovelace_minimalist/templates/EN.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ ulm_language_variables_EN:
ulm_floor_2: "Floor 2"
ulm_1_light: "1 light"
ulm_lights: " lights"
ulm_bedroom_makeup: "Makeup"

ulm_boiler: "Boiler"
ulm_kfir: "Kfir"
Expand Down
1 change: 1 addition & 0 deletions homeassistant/config/lovelace_minimalist/templates/HE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ ulm_language_variables:
ulm_floor_2: "קומה 2"
ulm_1_light: "אור 1"
ulm_lights: " אורות"
ulm_bedroom_makeup: "הורים איפור"

ulm_boiler: "דוד שמש"
ulm_kfir: "כפיר"
Expand Down
18 changes: 18 additions & 0 deletions homeassistant/config/lovelace_minimalist/views/view_bedroom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@ cards:
variables:
ulm_chip_icon_state_entity: sensor.number_of_lights_on_bedroom

# Covers Chip
- type: 'custom:button-card'
template:
- 'chip_icon_label_state'
- 'chip_blue'
icon: 'mdi:window-shutter'
variables:
ulm_chip_icon_state_entity: sensor.number_of_covers_open_bedroom

# Motion Chip
- type: 'custom:button-card'
template:
Expand Down Expand Up @@ -195,6 +204,15 @@ cards:
view_layout:
grid-row-start: span 2

# Bedroom Makup Cover
- type: 'custom:button-card'
template: card_cover_buttons
variables:
x_ulm_card_cover_buttons_name: "[[[ return variables.ulm_bedroom_makeup; ]]]"
ulm_card_cover_buttons_entity: cover.parents_makeup
view_layout:
grid-row-start: span 2

# Bedroom Radiator
# - type: 'custom:button-card'
# template: card_power_outlet
Expand Down
11 changes: 10 additions & 1 deletion homeassistant/config/lovelace_minimalist/views/view_covers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,15 @@ cards:
grid-template-columns: 1fr 1fr
cards:

# Bedroom Makup Cover
- type: 'custom:button-card'
template: card_cover_buttons
variables:
x_ulm_card_cover_buttons_name: "[[[ return variables.ulm_bedroom_makeup; ]]]"
ulm_card_cover_buttons_entity: cover.parents_makeup
view_layout:
grid-row-start: span 2

# Ronen Room Cover
- type: 'custom:button-card'
template: card_cover_buttons
Expand All @@ -278,7 +287,7 @@ cards:
ulm_card_cover_buttons_entity: cover.ronen_room
view_layout:
grid-row-start: span 2

# Kfir Room Cover
- type: 'custom:button-card'
template: card_cover_buttons
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@ cards:
variables:
ulm_chip_icon_state_entity: sensor.number_of_lights_on_kfir_room

# Covers Chip
- type: 'custom:button-card'
template:
- 'chip_icon_label_state'
- 'chip_blue'
icon: 'mdi:window-shutter'
variables:
ulm_chip_icon_state_entity: sensor.number_of_covers_open_kfir_room



############################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@ cards:
variables:
ulm_chip_icon_state_entity: sensor.number_of_lights_on_ronen_room

# Covers Chip
- type: 'custom:button-card'
template:
- 'chip_icon_label_state'
- 'chip_blue'
icon: 'mdi:window-shutter'
variables:
ulm_chip_icon_state_entity: sensor.number_of_covers_open_ronen_room



############################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,15 @@ cards:
grid-template-columns: 1fr 1fr 1fr 1fr
cards:

# Bedroom Makup Cover
- type: 'custom:button-card'
template: card_cover_buttons
variables:
x_ulm_card_cover_buttons_name: "[[[ return variables.ulm_bedroom_makeup; ]]]"
ulm_card_cover_buttons_entity: cover.parents_makeup
view_layout:
grid-row-start: span 2

# Ronen Room Cover
- type: 'custom:button-card'
template: card_cover_buttons
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,15 @@ cards:
grid-template-columns: 1fr 1fr
cards:

# Bedroom Makup Cover
- type: 'custom:button-card'
template: card_cover_buttons
variables:
x_ulm_card_cover_buttons_name: "[[[ return variables.ulm_bedroom_makeup; ]]]"
ulm_card_cover_buttons_entity: cover.parents_makeup
view_layout:
grid-row-start: span 2

# Ronen Room Cover
- type: 'custom:button-card'
template: card_cover_buttons
Expand All @@ -139,69 +148,6 @@ cards:



############################################################################
# #
# Heating #
# #
############################################################################

# Title
- type: horizontal-stack
cards:

- type: custom:button-card
template: title
name: "[[[ return variables.ulm_heating; ]]]"

- type: custom:layout-card
layout_type: grid
layout_options:
grid-template-columns: 1fr 1fr
grid-template-rows: auto
grid-gap: 0px 4px
mediaquery:
"(max-width: 450px)":
grid-template-columns: 1fr 1fr
cards:

# Bathroom Heater
- type: 'custom:button-card'
template:
- "card_power_outlet"
- "red_on"
variables:
ulm_card_power_outlet_consumption_sensor: sensor.bathroom_heater_power
entity: switch.bathroom_heater
name: "[[[ return variables.ulm_bathroom; ]]]"
icon: mdi:heat-wave

# Parents Bathroom Heater
- type: 'custom:button-card'
template:
- "card_power_outlet"
- "red_on"
variables:
ulm_card_power_outlet_consumption_sensor: sensor.parents_bathroom_heater_power
entity: switch.parents_bathroom_heater
name: "[[[ return variables.ulm_parents_bathroom; ]]]"
icon: mdi:heat-wave

# Switcher
- type: 'custom:button-card'
template:
- card_switcher
variables:
x_ulm_card_switcher_name: "[[[ return variables.ulm_boiler; ]]]"
ulm_card_switcher_icon: "mdi:waves"
ulm_card_switcher_entity: switch.switcher_boiler
ulm_card_switcher_timer_script: script.switcher_boiler_turn_on_timer_script
ulm_card_switcher_time_left: sensor.switcher_boiler_time_left_short
ulm_card_switcher_timer_minutes: input_select.switcher_boiler_timer_minutes_input_select
ulm_card_switcher_electric_current: sensor.switcher_boiler_electric_current
ulm_card_switcher_auto_off: sensor.switcher_boiler_auto_off_time
view_layout:
grid-row-start: span 2

############################################################################
# #
# Right Column #
Expand All @@ -211,6 +157,13 @@ cards:
- type: vertical-stack
cards:


############################################################################
# #
# Lights #
# #
############################################################################

# Lights
- type: horizontal-stack
cards:
Expand Down Expand Up @@ -333,3 +286,65 @@ cards:
name: "[[[ return variables.ulm_laundry; ]]]"


############################################################################
# #
# Heating #
# #
############################################################################

# Title
- type: horizontal-stack
cards:

- type: custom:button-card
template: title
name: "[[[ return variables.ulm_heating; ]]]"

- type: custom:layout-card
layout_type: grid
layout_options:
grid-template-columns: 1fr 1fr
grid-template-rows: auto
grid-gap: 0px 4px
mediaquery:
"(max-width: 450px)":
grid-template-columns: 1fr 1fr
cards:

# Bathroom Heater
- type: 'custom:button-card'
template:
- "card_power_outlet"
- "red_on"
variables:
ulm_card_power_outlet_consumption_sensor: sensor.bathroom_heater_power
entity: switch.bathroom_heater
name: "[[[ return variables.ulm_bathroom; ]]]"
icon: mdi:heat-wave

# Parents Bathroom Heater
- type: 'custom:button-card'
template:
- "card_power_outlet"
- "red_on"
variables:
ulm_card_power_outlet_consumption_sensor: sensor.parents_bathroom_heater_power
entity: switch.parents_bathroom_heater
name: "[[[ return variables.ulm_parents_bathroom; ]]]"
icon: mdi:heat-wave

# Switcher
- type: 'custom:button-card'
template:
- card_switcher
variables:
x_ulm_card_switcher_name: "[[[ return variables.ulm_boiler; ]]]"
ulm_card_switcher_icon: "mdi:waves"
ulm_card_switcher_entity: switch.switcher_boiler
ulm_card_switcher_timer_script: script.switcher_boiler_turn_on_timer_script
ulm_card_switcher_time_left: sensor.switcher_boiler_time_left_short
ulm_card_switcher_timer_minutes: input_select.switcher_boiler_timer_minutes_input_select
ulm_card_switcher_electric_current: sensor.switcher_boiler_electric_current
ulm_card_switcher_auto_off: sensor.switcher_boiler_auto_off_time
view_layout:
grid-row-start: span 2
51 changes: 51 additions & 0 deletions homeassistant/config/packages/covers/sensors_covers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,54 @@ template:
{% endfor %}
{{ count.value }}
############################################################################
# #
# Number of Covers Open - Bedroom #
# #
############################################################################

- name: "Number Of Covers Open Bedroom"
unique_id: number_of_covers_open_bedroom
state: >
{% set count = namespace(value=0) %}
{% for entity_id in state_attr('cover.bedroom_covers','entity_id') %}
{% if (states(entity_id) == 'open' or states(entity_id) == 'opening' or states(entity_id) == 'closing') %}
{% set count.value = count.value + 1 %}
{% endif %}
{% endfor %}
{{ count.value }}
############################################################################
# #
# Number of Covers Open - Ronen Room #
# #
############################################################################

- name: "Number Of Covers Open Ronen Room"
unique_id: number_of_covers_open_ronen_room
state: >
{% set count = namespace(value=0) %}
{% for entity_id in state_attr('cover.ronen_room_covers','entity_id') %}
{% if (states(entity_id) == 'open' or states(entity_id) == 'opening' or states(entity_id) == 'closing') %}
{% set count.value = count.value + 1 %}
{% endif %}
{% endfor %}
{{ count.value }}
############################################################################
# #
# Number of Covers Open - Kfir Room #
# #
############################################################################

- name: "Number Of Covers Open Kfir Room"
unique_id: number_of_covers_open_kfir_room
state: >
{% set count = namespace(value=0) %}
{% for entity_id in state_attr('cover.kfir_room_covers','entity_id') %}
{% if (states(entity_id) == 'open' or states(entity_id) == 'opening' or states(entity_id) == 'closing') %}
{% set count.value = count.value + 1 %}
{% endif %}
{% endfor %}
{{ count.value }}

0 comments on commit b2c8c9d

Please sign in to comment.