home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.6k stars 30.37k forks source link

Override schedule for work area not working for husquvarna integration #127361

Closed julianrehm87 closed 1 week ago

julianrehm87 commented 1 week ago

The problem

The documentation for husquvarna automower integration describes the possibility to overwrite the schedule for a work area (https://www.home-assistant.io/integrations/husqvarna_automower). Although it mentions the comment "if available", i have workareas defined and they are available in the work area sensor such as described in the documentation. Nevertheless, i am not able to use the service husqvarna_automower.override_schedule with parameter "work_area_id". In the graphical overview in automations this parameter does not appear. When switching over to YAML and adding it manually, the service cannot get called anymore as it does not recognize this parameter.

What version of Home Assistant Core has the issue?

core-2024.10.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Husqvarna Automower

Link to integration documentation on our website

https://www.home-assistant.io/integrations/husqvarna_automower/

Diagnostics information

{ "home_assistant": { "installation_type": "Home Assistant OS", "version": "2024.10.0", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.12.4", "docker": true, "arch": "aarch64", "timezone": "Europe/Berlin", "os_name": "Linux", "os_version": "6.6.31-haos-raspi", "supervisor": "2024.09.1", "host_os": "Home Assistant OS 13.1", "docker_version": "26.1.4", "chassis": "embedded", "run_as_root": true }, "custom_components": { "myuplink": { "documentation": "https://github.com/jaroschek/home-assistant-myuplink", "version": "1.5.0", "requirements": [] }, "fontawesome": { "documentation": "https://github.com/thomasloven/hass-fontawesome", "version": "2.2.3", "requirements": [] }, "hacs": { "documentation": "https://hacs.xyz/docs/configuration/start", "version": "2.0.1", "requirements": [ "aiogithubapi>=22.10.1" ] }, "miele": { "documentation": "https://github.com/astrandb/miele", "version": "2024.8.1", "requirements": [ "flatdict==4.0.1", "pymiele==0.1.7" ] }, "waste_collection_schedule": { "documentation": "https://github.com/mampfes/hacs_waste_collection_schedule#readme", "version": "2.2.0", "requirements": [ "icalendar", "recurring_ical_events", "icalevents!=0.1.28", "beautifulsoup4", "lxml", "pycryptodome" ] }, "eufy_security": { "documentation": "https://github.com/fuatakgun/eufy_security", "version": "8.0.4", "requirements": [ "websocket-client==1.4.2", "aiortsp==1.3.7" ] }, "webrtc": { "documentation": "https://github.com/AlexxIT/WebRTC", "version": "v3.5.2", "requirements": [] }, "presence_simulation": { "documentation": "https://github.com/slashback100/presence_simulation", "version": "4.10", "requirements": [] }, "senec": { "documentation": "https://github.com/marq24/ha-senec-v3/blob/master/README.md", "version": "2024.9.0", "requirements": [ "xmltodict>=0.12.0", "packaging>=21.0", "python-dateutil>=2.8.0" ] }, "gardena_smart_system": { "documentation": "https://github.com/py-smart-gardena/hass-gardena-smart-system", "version": "1.1.1", "requirements": [ "py-smart-gardena==1.3.9", "oauthlib==3.2.2" ] } }, "integration_manifest": { "domain": "husqvarna_automower", "name": "Husqvarna Automower", "codeowners": [ "Thomas55555" ], "config_flow": true, "dependencies": [ "application_credentials" ], "documentation": "https://www.home-assistant.io/integrations/husqvarna_automower", "iot_class": "cloud_push", "loggers": [ "aioautomower" ], "requirements": [ "aioautomower==2024.9.3" ], "is_built_in": true }, "setup_times": { "null": { "setup": 2.122204750776291e-05 }, "01J38SZP9ZDWST62AVT0CD90TM": { "wait_import_platforms": -0.2621738971211016, "config_entry_setup": 2.3216282231733203 } }, "data": { "system": { "name": "AM405X", "model": "Husqvarna Automower\u00ae 405X", "serial_number": 213601915 }, "battery": { "battery_percent": 100 }, "capabilities": { "can_confirm_error": true, "headlights": true, "position": true, "stay_out_zones": true, "work_areas": true }, "mower": { "mode": "MAIN_AREA", "activity": "PARKED_IN_CS", "state": "RESTRICTED", "error_code": 0, "error_key": null, "error_timestamp": 0, "error_datetime_naive": null, "inactive_reason": "NONE", "is_error_confirmable": false, "work_area_id": 0, "work_area_name": "my_lawn" }, "calendar": { "tasks": [] }, "planner": { "next_start": 0, "next_start_datetime_naive": null, "override": { "action": "NOT_ACTIVE" }, "restricted_reason": "EXTERNAL" }, "metadata": { "connected": true, "status_dateteime": "2024-10-02T20:32:26.598000+00:00" }, "positions": "REDACTED", "settings": { "headlight": { "mode": "EVENING_AND_NIGHT" }, "cutting_height": 6 }, "statistics": { "cutting_blade_usage_time": 38502, "number_of_charging_cycles": 710, "number_of_collisions": 12748, "total_charging_time": 1771514, "total_cutting_time": 2210533, "total_drive_distance": 692045, "total_running_time": 2471590, "total_searching_time": 184366 }, "stay_out_zones": { "dirty": false, "zones": {} }, "work_areas": { "0": { "name": "my_lawn", "cutting_height": 50, "enabled": true, "progress": null, "last_time_completed_naive": null }, "757": { "name": "Vorgarten", "cutting_height": 75, "enabled": true, "progress": null, "last_time_completed_naive": null }, "758": { "name": "Hauptarten", "cutting_height": 75, "enabled": true, "progress": null, "last_time_completed_naive": null }, "759": { "name": "Durchgang", "cutting_height": 75, "enabled": true, "progress": null, "last_time_completed_naive": null } }, "work_area_names": [ "my_lawn", "Vorgarten", "Hauptarten", "Durchgang", "no_work_area_active" ], "work_area_dict": { "0": "my_lawn", "757": "Vorgarten", "758": "Hauptarten", "759": "Durchgang" } } }

Example YAML snippet

action: husqvarna_automower.override_schedule
target:
  entity_id: lawn_mower.am405x
data:
  override_mode: mow
  duration:
    hours: 3
    minutes: 0
    seconds: 0
    days: 0
  work_area_id: 758

Anything in the logs that might be useful for us?

No response

Additional information

When adding the parameter work_area_id to the YAML snippet above, the system does not execute it anymore --> extra keys not allowed @ data['work_area_id']. Got None

home-assistant[bot] commented 1 week ago

Hey there @thomas55555, mind taking a look at this issue as it has been labeled with an integration (husqvarna_automower) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `husqvarna_automower` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign husqvarna_automower` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


husqvarna_automower documentation husqvarna_automower source (message by IssueLinks)

Thomas55555 commented 1 week ago

Looks Like a copy and paste issue in the documentation. Please try the action override_schedule_work_area and let me know, if this works.

Thomas55555 commented 1 week ago

@home-assistant add-label needs-more-information

julianrehm87 commented 1 week ago

@Thomas55555 : Can confirm that the correct seem to work. So looks like just a documentation error.

Thomas55555 commented 1 week ago

@home-assistant close