From f9dc0e8bd0702ea3bb72d4c5d656577a61e80ab0 Mon Sep 17 00:00:00 2001 From: golles Date: Thu, 24 Oct 2024 20:45:58 +0000 Subject: [PATCH] Add oven --- lovelace/views/cards/let_op.yaml | 8 ++++++++ lovelace/views/keuken.yaml | 3 +++ lovelace/views/welkom.yaml | 3 +++ packages/home_connect.yaml | 31 +++++++++++++++++++++++++++++++ packages/lovelace.yaml | 6 ++++++ 5 files changed, 51 insertions(+) diff --git a/lovelace/views/cards/let_op.yaml b/lovelace/views/cards/let_op.yaml index e17e372..df0b058 100644 --- a/lovelace/views/cards/let_op.yaml +++ b/lovelace/views/cards/let_op.yaml @@ -94,6 +94,14 @@ cards: entity: binary_sensor.ui_helper_let_op_wasmachine state: "on" + - type: tile + entity: sensor.oven_status + name: Oven + visibility: + - condition: state + entity: binary_sensor.ui_helper_let_op_oven + state: "on" + - type: tile entity: input_boolean.vacation_mode visibility: diff --git a/lovelace/views/keuken.yaml b/lovelace/views/keuken.yaml index fbb5e71..3cb0286 100644 --- a/lovelace/views/keuken.yaml +++ b/lovelace/views/keuken.yaml @@ -48,6 +48,9 @@ sections: - type: heading heading: Apparaten heading_style: subtitle + - type: tile + entity: sensor.oven_status + name: Oven - type: tile entity: sensor.vaatwasser_status name: Vaatwasser diff --git a/lovelace/views/welkom.yaml b/lovelace/views/welkom.yaml index 7bf8914..f4e0c0d 100644 --- a/lovelace/views/welkom.yaml +++ b/lovelace/views/welkom.yaml @@ -198,6 +198,9 @@ sections: - type: tile entity: cover.keuken name: Rolgordijn + - type: tile + entity: sensor.oven_status + name: Oven - type: tile entity: sensor.vaatwasser_status name: Vaatwasser diff --git a/packages/home_connect.yaml b/packages/home_connect.yaml index ae03636..fc4057f 100644 --- a/packages/home_connect.yaml +++ b/packages/home_connect.yaml @@ -19,6 +19,14 @@ template: state: >- {% from "home_connect.jinja" import program_translation %} {% set prefix = "Vaatwasser Program " %} + {% set translations = {"BottomHeating": "Onderwarmte", "HotAir": "Warme lucht", "HotAirGrilling": "Warme lucht en grill", "KeepWarm": "Warmhouden", "PizzaSetting": "Pizzastand", "PreHeating": "Voorverwarmen", "PreheatOvenware": "Servies voorverwarmen", "SlowCook": "Langzaam garen", "TopBottomHeating": "Boven- en onder warmte", "TopBottomHeatingEco": "Boven- en onder warmte Eco"} %} + {{ program_translation(prefix, translations) }} + + - name: Oven programma + icon: mdi:stove + state: >- + {% from "home_connect.jinja" import program_translation %} + {% set prefix = "Oven Program " %} {% set translations = {"Auto2": "Auto 45-65°C", "Eco50": "Eco 50°C", "Glas40": "Glas 40°C", "Intensiv70": "Intensief 70°C", "Kurz60": "Kort 60°C", "MachineCare": "Machineverzorging", "NightWash": "Nachtprogramma", "PreRinse": "Voorspoelen", "Quick45": "Snel programma 45°C"} %} {{ program_translation(prefix, translations) }} @@ -34,6 +42,12 @@ template: {% from "home_connect.jinja" import remaining_time %} {{ remaining_time("sensor.vaatwasser_remaining_program_time", "switch.vaatwasser_power") }} + - name: Oven resterende minuten + icon: mdi:clock + state: >- + {% from "home_connect.jinja" import remaining_time %} + {{ remaining_time("sensor.oven_remaining_program_time", "switch.oven_power") }} + - name: Wasmachine status icon: mdi:washing-machine state: >- @@ -64,6 +78,21 @@ template: {{ states("switch.vaatwasser_power") }} {%- endif %} + - name: Oven status + icon: mdi:stove + state: >- + {% if states("binary_sensor.oven_door") == "on" -%} + Deur open + {% elif states("sensor.oven_operation_state") == "Finished" -%} + Klaar + {% elif states("sensor.oven_operation_state") == "Run" -%} + {{ states("sensor.oven_resterende_minuten") }} + {% elif states("binary_sensor.oven_remote_start") == "on" -%} + Uitgestelde start + {%- else -%} + {{ states("switch.oven_power") }} + {%- endif %} + automation: - id: home_connect_conversation_remaining_time alias: "Spraakassistent: Wanneer is de machine klaar" @@ -79,6 +108,8 @@ automation: over {{ states("sensor.vaatwasser_resterende_minuten") }} {% elif trigger.slots.machine == "wasmachine" and states("sensor.wasmachine_resterende_minuten") != "unavailable" %} over {{ states("sensor.wasmachine_resterende_minuten") }} + {% elif trigger.slots.machine == "oven" and states("sensor.oven_resterende_minuten") != "unavailable" %} + over {{ states("sensor.oven_resterende_minuten") }} {% else %} Ik weet het niet, staat de {{ trigger.slots.machine }} wel aan? {% endif %} diff --git a/packages/lovelace.yaml b/packages/lovelace.yaml index ea4b756..c688759 100644 --- a/packages/lovelace.yaml +++ b/packages/lovelace.yaml @@ -76,6 +76,11 @@ template: {{ states("sensor.wasmachine_status") not in ["off", "unavailable", "unknown"] }} + - name: UI helper let op oven + state: >- + {{ + states("sensor.oven_status") not in ["off", "unavailable", "unknown"] + }} - name: UI helper let op section state: >- {{ @@ -89,6 +94,7 @@ template: is_state("binary_sensor.ui_helper_let_op_afval_papier", "on") or is_state("binary_sensor.ui_helper_let_op_vaatwasser", "on") or is_state("binary_sensor.ui_helper_let_op_wasmachine", "on") or + is_state("binary_sensor.ui_helper_let_op_oven", "on") or is_state("input_boolean.vacation_mode", "on") or is_state("binary_sensor.ui_helper_let_op_zonnescherm", "on") }}