openhasp: hasp1: objects: - obj: "p0b1" # date/clock label on all pages properties: "text": '{{ (as_timestamp(now()) | timestamp_custom("%a %d.%m.%Y | %H:%M")) | replace("Mon", "Mo") | replace("Tue", "Di") | replace("Wed", "Mi") | replace("Thu", "Do") | replace("Fri", "Fr") | replace("Sat", "Sa") | replace("Sun", "So")}}' - obj: "p0b2" # temperature label on all pages properties: "text": '{{ states("sensor.openweathermap_temperature") }}°C' #------------------------- # Hobbyraum #------------------------- # Hobbyraum Licht - obj: "p2b11" # light-switch toggle button properties: "val": '{{ 1 if states("light.hobbyraum_licht") == "on" else 0 }}' "value_str": '{{ "\uE6E8" if is_state("light.hobbyraum_licht", "on") else "\uE335" | e }}' event: "up": - service: homeassistant.toggle entity_id: "light.hobbyraum_licht" # LED Panel - obj: "p2b21" # light-switch toggle button properties: "val": '{{ 1 if states("switch.shelly_plug_s_led_panel") == "on" else 0 }}' "value_str": '{{ "\uE6E8" if is_state("switch.shelly_plug_s_led_panel", "on") else "\uE335" | e }}' event: "up": - service: homeassistant.toggle entity_id: "switch.shelly_plug_s_led_panel" # Govee Glide - obj: "p2b31" # light-switch toggle button properties: "val": '{{ 1 if states("light.govee_glide") == "on" else 0 }}' "value_str": '{{ "\uE6E8" if is_state("light.govee_glide", "on") else "\uE335" | e }}' event: "up": - service: homeassistant.toggle entity_id: "light.govee_glide" - obj: "p2b32" # Light brightness properties: "val": "{{ state_attr('light.govee_glide', 'brightness') if state_attr('light.govee_glide', 'brightness') != None else 0 }}" event: "changed": - service: light.turn_on data: entity_id: light.govee_glide brightness: "{{ val }}" "up": - service: light.turn_on data: entity_id: light.govee_glide brightness: "{{ val }}" - obj: "p2b33" # Light color properties: "color": > {% if is_state('light.govee_glide','on') %} {% set rgb = state_attr('light.govee_glide','rgb_color') %} {{ "#%02x%02x%02x" | format(rgb[0],rgb[1],rgb[2]) }} {% endif %} event: "up": - service: light.turn_on data: entity_id: light.govee_glide rgb_color: "[{{ r }},{{ g }},{{ b }}]" # LED Stripe Arbeitsplatte - obj: "p2b41" # light-switch toggle button properties: "val": '{{ 1 if states("light.rgb_hobbyraum_arbeitsplatte") == "on" else 0 }}' "value_str": '{{ "\uE6E8" if is_state("light.rgb_hobbyraum_arbeitsplatte", "on") else "\uE335" | e }}' event: "up": - service: homeassistant.toggle entity_id: "light.rgb_hobbyraum_arbeitsplatte" - obj: "p2b42" # Light brightness properties: "val": "{{ state_attr('light.rgb_hobbyraum_arbeitsplatte', 'brightness') if state_attr('light.rgb_hobbyraum_arbeitsplatte', 'brightness') != None else 0 }}" event: "changed": - service: light.turn_on data: entity_id: light.rgb_hobbyraum_arbeitsplatte brightness: "{{ val }}" "up": - service: light.turn_on data: entity_id: light.rgb_hobbyraum_arbeitsplatte brightness: "{{ val }}" - obj: "p2b43" # Light color properties: "color": > {% if is_state('light.rgb_hobbyraum_arbeitsplatte','on') %} {% set rgb = state_attr('light.rgb_hobbyraum_arbeitsplatte','rgb_color') %} {{ "#%02x%02x%02x" | format(rgb[0],rgb[1],rgb[2]) }} {% endif %} event: "up": - service: light.turn_on data: entity_id: light.rgb_hobbyraum_arbeitsplatte rgb_color: "[{{ r }},{{ g }},{{ b }}]" #------------------------- # Büro #------------------------- # Büro Licht - obj: "p3b11" # light-switch toggle button properties: "val": '{{ 1 if states("light.buro_licht") == "on" else 0 }}' "value_str": '{{ "\uE6E8" if is_state("light.buro_licht", "on") else "\uE335" | e }}' event: "up": - service: homeassistant.toggle entity_id: "light.buro_licht" # Nanoleaf - obj: "p3b21" # light-switch toggle button properties: "val": '{{ 1 if states("light.nanoleaf") == "on" else 0 }}' "value_str": '{{ "\uE6E8" if is_state("light.nanoleaf", "on") else "\uE335" | e }}' event: "up": - service: homeassistant.toggle entity_id: "light.nanoleaf" - obj: "p3b22" # Light brightness properties: "val": "{{ state_attr('light.nanoleaf', 'brightness') if state_attr('light.nanoleaf', 'brightness') != None else 0 }}" event: "changed": - service: light.turn_on data: entity_id: light.nanoleaf brightness: "{{ val }}" "up": - service: light.turn_on data: entity_id: light.nanoleaf brightness: "{{ val }}" - obj: "p3b23" # Light color properties: "color": > {% if is_state('light.nanoleaf','on') %} {% set rgb = state_attr('light.nanoleaf','rgb_color') %} {{ "#%02x%02x%02x" | format(rgb[0],rgb[1],rgb[2]) }} {% endif %} event: "up": - service: light.turn_on data: entity_id: light.nanoleaf rgb_color: "[{{ r }},{{ g }},{{ b }}]" # Ambilight Jenny - obj: "p3b31" # light-switch toggle button properties: "val": '{{ 1 if states("light.rgb_led_backlight_buro_jenny") == "on" else 0 }}' "value_str": '{{ "\uE6E8" if is_state("light.rgb_led_backlight_buro_jenny", "on") else "\uE335" | e }}' event: "up": - service: homeassistant.toggle entity_id: "light.rgb_led_backlight_buro_jenny" - obj: "p3b32" # Light brightness properties: "val": "{{ state_attr('light.rgb_led_backlight_buro_jenny', 'brightness') if state_attr('light.rgb_led_backlight_buro_jenny', 'brightness') != None else 0 }}" event: "changed": - service: light.turn_on data: entity_id: light.rgb_led_backlight_buro_jenny brightness: "{{ val }}" "up": - service: light.turn_on data: entity_id: light.rgb_led_backlight_buro_jenny brightness: "{{ val }}" - obj: "p3b33" # Light color properties: "color": > {% if is_state('light.rgb_led_backlight_buro_jenny','on') %} {% set rgb = state_attr('light.rgb_led_backlight_buro_jenny','rgb_color') %} {{ "#%02x%02x%02x" | format(rgb[0],rgb[1],rgb[2]) }} {% endif %} event: "up": - service: light.turn_on data: entity_id: light.rgb_led_backlight_buro_jenny rgb_color: "[{{ r }},{{ g }},{{ b }}]" #------------------------- # Büro HEIZUNG #------------------------- - obj: "p9b20" # arc slider properties: "val": > {% if state_attr('climate.shelly_heizung_buro','temperature') is not none %} {{ state_attr('climate.shelly_heizung_buro','temperature') | int * 10 }} {%- endif %} "min": > {% if state_attr('climate.shelly_heizung_buro','min_temp') is not none %} {{ state_attr('climate.shelly_heizung_buro','min_temp') | int * 10 }} {%- endif %} "max": > {% if state_attr('climate.shelly_heizung_buro','max_temp') is not none %} {{ state_attr('climate.shelly_heizung_buro','max_temp') | int * 10 }} {%- endif %} "opacity": "{{ 60 if (is_state('climate.shelly_heizung_buro','unavailable') or is_state('climate.shelly_heizung_buro','unknown')) else 255 }}" "click": "{{ 'false' if (is_state('climate.shelly_heizung_buro','unavailable') or is_state('climate.shelly_heizung_buro','unknown')) else 'true' }}" "line_color1": > {% if is_state('climate.shelly_heizung_buro', 'cool') %} {{ "#346beb" }} {%-elif is_state('climate.shelly_heizung_buro', 'heat_cool') %} {{ "#34bdeb" }} {%-elif is_state('climate.shelly_heizung_buro', 'heat') %} {{ "#eb3434" }} {%-elif is_state('climate.shelly_heizung_buro', 'dry') %} {{ "#ebeb34" }} {%-elif is_state('climate.shelly_heizung_buro', 'fan_only') %} {{ "#34eb77" }} {%-else %} {{ "#9f96b0" }} {% endif %} event: "changed": - service: climate.set_temperature target: entity_id: climate.shelly_heizung_buro data: temperature: "{{ val | int / 10 }}" "up": - service: climate.set_temperature target: entity_id: climate.shelly_heizung_buro data: temperature: "{{ val | int / 10 }}" - obj: "p9b21" # gauge current temp properties: "val": > {% if not (is_state('climate.shelly_heizung_buro','unavailable') or is_state('climate.shelly_heizung_buro','unknown')) %} {{ state_attr('climate.shelly_heizung_buro', 'current_temperature') | float (default=0) * 10 }} {%- endif %} "opacity": "{{ 60 if (is_state('climate.shelly_heizung_buro','unavailable') or is_state('climate.shelly_heizung_buro','unknown')) else 255 }}" - obj: "p9b23" # label current temp (and +/- with short/long touch) properties: "text": > {% if (is_state('climate.shelly_heizung_buro','unavailable') or is_state('climate.shelly_heizung_buro','unknown')) %} {{ "--.-" }} {%-else %} {{ state_attr('climate.shelly_heizung_buro', 'current_temperature') | round(1,default=0) }} {%- endif %} "click": "{{ 'false' if (is_state('climate.shelly_heizung_buro','unavailable') or is_state('climate.shelly_heizung_buro','unknown')) else 'true' }}" "opacity": "{{ 60 if (is_state('climate.shelly_heizung_buro','unavailable') or is_state('climate.shelly_heizung_buro','unknown')) else 255 }}" event: "up": - service: climate.set_temperature target: entity_id: climate.shelly_heizung_buro data: temperature: "{{ state_attr('climate.shelly_heizung_buro','temperature') + state_attr('climate.shelly_heizung_buro','target_temp_step') | float(default=1)}}" "long": - service: climate.set_temperature target: entity_id: climate.shelly_heizung_buro data: temperature: "{{ state_attr('climate.shelly_heizung_buro','temperature') - state_attr('climate.shelly_heizung_buro','target_temp_step') | float(default=1)}}" - obj: "p9b25" # label target temp properties: "text": > {% if state_attr('climate.shelly_heizung_buro','temperature') is not none %} {{ state_attr('climate.shelly_heizung_buro','temperature') }} {%- endif %} "opacity": "{{ 60 if (is_state('climate.shelly_heizung_buro','unavailable') or is_state('climate.shelly_heizung_buro','unknown')) else 255 }}" - obj: "p9b41" # on/off switch properties: "val": "{{ 0 if (is_state('climate.shelly_heizung_buro', 'off') or is_state('climate.shelly_heizung_buro', 'unavailable')) else 1 }}" "click": "{{ 'false' if (is_state('climate.shelly_heizung_buro','unavailable') or is_state('climate.shelly_heizung_buro','unknown')) else 'true' }}" "opacity": "{{ 60 if (is_state('climate.shelly_heizung_buro','unavailable') or is_state('climate.shelly_heizung_buro','unknown')) else 255 }}" event: "down": - service_template: > {% if val == 0 -%} climate.turn_on {% else -%} climate.turn_off {% endif -%} entity_id: "climate.shelly_heizung_buro" - obj: "p9b30" # tab dots event: "changed": - service: openhasp.command target: entity_id: openhasp.your_plate data: keyword: p9b26.text parameters: > {% if val == 0 %} {{ "#000000 \u2022# #909090 \u2022#" | e }} {%-elif val == 1 %} {{ "#909090 \u2022# #000000 \u2022#" | e }} {% endif %} - obj: "p9b43" # dropdown with hvac_modes properties: "options": > {% if state_attr('climate.shelly_heizung_buro','hvac_modes') is not none %}{%for mode in state_attr('climate.shelly_heizung_buro','hvac_modes')%} {%- if mode == 'off' -%} Off{{"\n"|e}} {%- elif mode == 'heat' -%} Heating{{"\n"|e}} {%- elif mode == 'cool' -%} Cooling{{"\n"|e}} {%- elif mode == 'heat_cool' -%} Heat/Cool{{"\n"|e}} {%- elif mode == 'dry' -%} Drying{{"\n"|e}} {%- elif mode == 'fan_only' -%} Fan only{{"\n"|e}} {%- else -%} On{{"\n"|e}} {%- endif -%} {%-if not loop.last%}{%-endif%}{%-endfor%}{% endif %} "click": "{{ 'false' if (is_state('climate.shelly_heizung_buro','unavailable') or is_state('climate.shelly_heizung_buro','unknown')) else 'true' }}" "val": > {% if not (is_state('climate.shelly_heizung_buro','unavailable')) %}{%for mode in state_attr('climate.shelly_heizung_buro','hvac_modes')%} {{loop.index -1 if mode == states('climate.shelly_heizung_buro') }} {%-endfor%}{% endif %} event: "changed": - service: climate.set_hvac_mode target: entity_id: climate.shelly_heizung_buro data: hvac_mode: > {% if text == "Off" -%} off {% elif text == 'Heating' -%} heat {% elif text == 'Cooling' -%} cool {% elif text == 'Heat/Cool' -%} heat_cool {% elif text == 'Drying' -%} dry {% elif text == 'Fan only' -%} fan_only {% endif -%}