-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic path spacing adjustment for Mammotion models #137
Conversation
Fixes mikey0000#125 Update `path_spacing` entity to dynamically set min and max values based on Mammotion model. * Set `min_value` to 15 and `max_value` to 30 for Yuka model. * Set `min_value` to 20 and `max_value` to 35 for Luba model. * Use `DeviceType` utility to determine the model type. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/mikey0000/Mammotion-HA/issues/125?shareId=XXXX-XXXX-XXXX-XXXX).
PR Review 🔍
|
PR Code Suggestions ✨
|
Implement scheduling, mapping and zone management, firmware updates, and automations for the Mammotion integration. * **Scheduling**: Add `custom_components/mammotion/scheduler.py` to handle scheduling tasks for the mower, including functions to start, stop, and modify schedules. * **Mapping and Zone Management**: Add `custom_components/mammotion/mapping.py` to manage zones, including functions to create, update, delete, and retrieve zones. * **Firmware Updates**: Add `custom_components/mammotion/firmware.py` to handle firmware updates, including functions to check for, download, and install updates. * **Automations**: Add `custom_components/mammotion/automation.py` to manage automations, including functions to create, update, and delete automations. * **Documentation**: Update `README.md` to reflect the implementation of scheduling, mapping and zone management, firmware updates, and automations, and add sections on how to use these new features. * **Error Handling**: Add `custom_components/mammotion/error_handling.py` to handle different types of errors and provide clear error messages. * **Unit Tests**: Add unit tests for the new functionalities: - `tests/test_scheduler.py` for scheduling - `tests/test_mapping.py` for mapping and zone management - `tests/test_firmware.py` for firmware updates - `tests/test_automation.py` for automations --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/hurtigit/Mammotion-HA?shareId=XXXX-XXXX-XXXX-XXXX).
Add scheduler, mapping, firmware, and automation features
@@ -101,8 +101,8 @@ class MammotionConfigNumberEntityDescription(NumberEntityDescription): | |||
step=1, | |||
device_class=NumberDeviceClass.DISTANCE, | |||
native_unit_of_measurement=UnitOfLength.CENTIMETERS, | |||
min_value=20, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is the device limits data class which controls these values
Some interesting additions here, scheduling is controlled by the tasks on the mower, though are all of these native entities in HA? |
User description
Fixes #125
Update
path_spacing
entity to dynamically set min and max values based on Mammotion model.min_value
to 15 andmax_value
to 30 for Yuka model.min_value
to 20 andmax_value
to 35 for Luba model.DeviceType
utility to determine the model type.For more details, open the Copilot Workspace session.
Description
path_spacing
entity to set dynamic min and max values based on the Mammotion model.min_value
is now 15 for Yuka model and 20 for Luba model.max_value
is now 30 for Yuka model and 35 for Luba model.Changes walkthrough 📝
number.py
Dynamic Path Spacing Adjustment for Mammotion Models
custom_components/mammotion/number.py
min_value
andmax_value
forpath_spacing
based on device type.DeviceType
utility.