From c6741645b63e992e4da80c69b61fa595b97ebee6 Mon Sep 17 00:00:00 2001 From: Jarno Rankinen Date: Fri, 10 Mar 2023 11:52:55 +0200 Subject: [PATCH] gh-6 update dashboard, helpers and automations for temperature setting via helper+automations. Will postpone updating the english dashboard until most of the features are done in the finnish version. --- homeassistant/automations.yaml | 49 +++++++++++++++++++++++++++++++-- homeassistant/dashboard-fi.yaml | 44 +++++++++++++++++++++++++++-- homeassistant/helpers.yaml | 15 +++++++++- 3 files changed, 102 insertions(+), 6 deletions(-) diff --git a/homeassistant/automations.yaml b/homeassistant/automations.yaml index 4949a9a..38f2235 100644 --- a/homeassistant/automations.yaml +++ b/homeassistant/automations.yaml @@ -1,4 +1,5 @@ automation: +## Modesetting automations - alias: Penguin Max Heating input description: "" trigger: @@ -63,8 +64,6 @@ automation: target: entity_id: input_boolean.penguin_max_heating mode: single - - - alias: Penguin circulation fan mode description: "" trigger: @@ -88,3 +87,49 @@ automation: - service: rest_command.penguin_circulation_manual data: {} mode: single + +## Target temperature setting automations +- alias: Penguin Temperature setting updater + description: '' + trigger: + - platform: state + entity_id: + - sensor.penguin_temperature_setting + condition: [] + action: + - service: input_number.set_value + data: + value: '{{ states(''sensor.penguin_temperature_setting'') }}' + target: + entity_id: input_number.penguin_temperature_setting_helper + mode: single +- alias: Penguin temperature up + description: '' + trigger: + - platform: state + entity_id: + - input_button.penguin_temperature_up + condition: [] + action: + - service: rest_command.penguin_temperature_up + data: {} + - service: input_number.increment + data: {} + target: + entity_id: input_number.penguin_temperature_setting_helper + mode: single +- alias: Penguin temperature down + description: '' + trigger: + - platform: state + entity_id: + - input_button.penguin_temperature_down + condition: [] + action: + - service: rest_command.penguin_temperature_down + data: {} + - service: input_number.decrement + data: {} + target: + entity_id: input_number.penguin_temperature_setting_helper + mode: single \ No newline at end of file diff --git a/homeassistant/dashboard-fi.yaml b/homeassistant/dashboard-fi.yaml index 254f2fb..74ebb7b 100644 --- a/homeassistant/dashboard-fi.yaml +++ b/homeassistant/dashboard-fi.yaml @@ -20,10 +20,10 @@ views: yellow: 0 red: 100 - square: false - columns: 3 + columns: 4 type: grid cards: - - show_name: true + - show_name: false show_icon: true type: button tap_action: @@ -31,7 +31,7 @@ views: entity: input_boolean.penguin_circulation_fan_adaptive name: Mukautuva kiertoilma show_state: false - - show_name: true + - show_name: false show_icon: true type: button tap_action: @@ -39,6 +39,44 @@ views: entity: input_boolean.penguin_max_heating name: Max lämmitys show_state: false + - show_name: false + show_icon: true + type: button + tap_action: + action: toggle + icon: mdi:block-helper + - show_name: false + show_icon: true + type: button + tap_action: + action: toggle + icon: mdi:block-helper + - square: false + columns: 3 + type: grid + cards: + - show_name: false + show_icon: true + type: button + tap_action: + action: toggle + entity: input_button.penguin_temperature_down + icon: mdi:minus + icon_height: 36px + - type: gauge + entity: input_number.penguin_temperature_setting_helper + name: ' ' + needle: true + min: 16 + max: 30 + - show_name: false + show_icon: true + type: button + tap_action: + action: toggle + entity: input_button.penguin_temperature_up + icon: mdi:plus + icon_height: 36px - type: entities entities: - entity: sensor.penguin_operating_mode diff --git a/homeassistant/helpers.yaml b/homeassistant/helpers.yaml index 61f481b..410835e 100644 --- a/homeassistant/helpers.yaml +++ b/homeassistant/helpers.yaml @@ -4,4 +4,17 @@ input_boolean: icon: mdi:heat-wave penguin_circulation_fan_adaptive: name: Penguin Adaptive Circulation Fan - icon: mdi:fan-auto \ No newline at end of file + icon: mdi:fan-auto +input_button: + penguin_temperature_up: + name: Penguin temperature up + icon: mdi:thermometer-plus + penguin_temperature_down: + name: Penguin temperature down + icon: mdi:thermometer-minus +input_number: + penguin_temperature_setting_helper: + name: Penguin temperature setting helper + min: 20 + max: 30 + unit_of_measurement: "°C" \ No newline at end of file