From 6f1a6107c92c4e89e472324555128c6e2d38a304 Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Wed, 28 Feb 2024 03:34:55 +0800 Subject: [PATCH] :sparkles: fix icon, fix required key not provided @data['oscillating'] error --- esphome/nspanel_esphome_core.yaml | 2 +- nspanel_blueprint.yaml | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/esphome/nspanel_esphome_core.yaml b/esphome/nspanel_esphome_core.yaml index 7bc495d..20b0d8a 100644 --- a/esphome/nspanel_esphome_core.yaml +++ b/esphome/nspanel_esphome_core.yaml @@ -854,7 +854,7 @@ display: case 22: // fan switch (component_id) { case 17: // bt_oscillate - ha_call_service->execute("fan.oscillate", "", "toggle", detailed_entity->state.c_str()); + ha_call_service->execute("fan.oscillate", "", "", detailed_entity->state.c_str()); break; } } diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 0923dd3..9e70fe0 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -7360,10 +7360,8 @@ action: action: > {{ (not state_attr(nspanel_event.entity, "oscillating") | default(true)) - if nspanel_event.value == "toggle" - else nspanel_event.value }} - - service: fan.set_percentage + - service: fan.oscillate data: oscillating: '{{ action }}' target: @@ -8338,7 +8336,7 @@ action: - service: '{{ nspanel.service.component.text }}' data: id: bt_oscillate - txt: '{{ all_icons["autorenew-off"] if state_attr(fan_entity, "oscillating") | default(false) else all_icons["autorenew-on"] }}' + txt: '{{ all_icons["autorenew"] if state_attr(fan_entity, "oscillating") | default(false) else all_icons["autorenew-off"] }}' continue_on_error: true - service: '{{ nspanel.service.component.visibility }}' data: