Add switches and sensors to Litter-Robot#46942
Conversation
|
second opinion request is for #46942 (comment) |
I've resolved the other changes requested |
6968085 to
7266af6
Compare
|
@bdraco, I removed the "night mode" switch, but moved the attributes in question to the vacuum entity. The reason for removing the switch is that to turn it on, the user needs to have a time component to specify when it should start. So either it defaults to a start time (which I was doing before, but didn't seem intuitive) or a configuration input_datetime, or something similar, needs to be added for better control. Because the sleep mode can be set by calling a command on the vacuum entity which has been documented, I decided that I could probably do away with this particular switch for now until a better solution is available. |
bdraco
left a comment
There was a problem hiding this comment.
Should be good to merge after switching the test to comply with https://developers.home-assistant.io/docs/development_testing/#writing-tests-for-integrations
|
Congrats, @natekspencer. I look forward to using the native integration and not HACS. :) |
|
Thanks, @bdraco and @joelmoses! I'm looking forward to having more people use this and see what changes can be made in the future! |
MartinHjelmare
left a comment
There was a problem hiding this comment.
Please address the comments in a new PR. Thanks!
| def device_state_attributes(self): | ||
| """Return device specific state attributes.""" | ||
| return { | ||
| "cycle_count": self.robot.cycle_count, |
There was a problem hiding this comment.
Can these attributes be separate sensor entities instead? If a measurement is relevant on its own we want it to be a separate entity.
| [sleep_mode_start_time, sleep_mode_end_time] = [None, None] | ||
|
|
||
| if self.robot.sleep_mode_active: | ||
| sleep_mode_start_time = dt_util.as_local( |
There was a problem hiding this comment.
Times in state attributes must be absolute UTC time.
Breaking change
Proposed change
Adds switches and sensors to the Litter-Robot platform for a better end user experience.
Type of change
Additional information
Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: