From 78e1b72d79cf8913dab75060aaea2d9a2dd370fc Mon Sep 17 00:00:00 2001 From: codyc1515 <50791984+codyc1515@users.noreply.github.com> Date: Wed, 10 Jan 2024 17:20:46 +1300 Subject: [PATCH 1/3] Update Timer services so that YAML configuration is not required --- custom_components/dyson_local/services.yaml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/custom_components/dyson_local/services.yaml b/custom_components/dyson_local/services.yaml index e9d5777..54a0c60 100644 --- a/custom_components/dyson_local/services.yaml +++ b/custom_components/dyson_local/services.yaml @@ -17,13 +17,18 @@ set_angle: set_timer: name: Set Timer - description: Set the sleep timer. + description: Sets, or clears, the timer of a fan (in minutes). + target: + entity: + domain: fan fields: - entity_id: - name: Entity ID - description: Name(s) of the entities to set the sleep timer for - example: "fan.living_room" timer: - name: Timer - description: The value in minutes to set the timer to, 0 to disable it - example: 30 + name: Minutes + description: How many minutes the timer should run for. Set to 0 to disable timer. + selector: + number: + min: 0 + max: 540 + step: 1 + unit_of_measurement: minutes + required: true \ No newline at end of file From f41a7dc80ad3ab50035d16c9f116be614260c51d Mon Sep 17 00:00:00 2001 From: Cody C <50791984+codyc1515@users.noreply.github.com> Date: Wed, 10 Jan 2024 17:25:52 +1300 Subject: [PATCH 2/3] Update services.yaml to fix linting error --- custom_components/dyson_local/services.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/dyson_local/services.yaml b/custom_components/dyson_local/services.yaml index 54a0c60..b020d3c 100644 --- a/custom_components/dyson_local/services.yaml +++ b/custom_components/dyson_local/services.yaml @@ -30,5 +30,5 @@ set_timer: min: 0 max: 540 step: 1 - unit_of_measurement: minutes - required: true \ No newline at end of file + unit_of_measurement: "minutes" + required: true From b2459b9c441a3fe1ea825d593f073358c57a5641 Mon Sep 17 00:00:00 2001 From: Cody C <50791984+codyc1515@users.noreply.github.com> Date: Wed, 10 Jan 2024 17:29:23 +1300 Subject: [PATCH 3/3] Update services.yaml to fix second linting issue --- custom_components/dyson_local/services.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/dyson_local/services.yaml b/custom_components/dyson_local/services.yaml index b020d3c..2a44b00 100644 --- a/custom_components/dyson_local/services.yaml +++ b/custom_components/dyson_local/services.yaml @@ -30,5 +30,5 @@ set_timer: min: 0 max: 540 step: 1 - unit_of_measurement: "minutes" + unit_of_measurement: "minutes" required: true