Skip to content
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

Add support for Snooz BLE devices #78790

Merged
merged 42 commits into from
Oct 10, 2022
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
cbdaeea
Add Snooz component
AustinBrunkhorst Sep 19, 2022
6876c3d
Merge branch 'dev' into snooz
AustinBrunkhorst Sep 28, 2022
f0e46f9
Remove sensor entities, trim changes
AustinBrunkhorst Oct 1, 2022
14e8182
Update pysnooz to 0.7.8
AustinBrunkhorst Oct 1, 2022
c5021f9
Merge branch 'dev' into snooz
AustinBrunkhorst Oct 1, 2022
095e703
Remove linter comment
AustinBrunkhorst Oct 1, 2022
6f2fbcb
Remove services
AustinBrunkhorst Oct 1, 2022
b7c7b45
Remove service tests
AustinBrunkhorst Oct 1, 2022
34e2744
Remove public disconnect service method
AustinBrunkhorst Oct 1, 2022
cf55689
Raise HomeAssistantError instead of updating attribute
AustinBrunkhorst Oct 2, 2022
77f4c76
Remove loop from Event
AustinBrunkhorst Oct 2, 2022
f3c6cbb
Update homeassistant/components/snooz/fan.py
AustinBrunkhorst Oct 2, 2022
c47bd6e
Update homeassistant/components/snooz/fan.py
AustinBrunkhorst Oct 2, 2022
b287192
PR feedback
AustinBrunkhorst Oct 2, 2022
d141270
Remove attribute from tests
AustinBrunkhorst Oct 2, 2022
3e8e93d
Merge branch 'snooz' of https://github.com/AustinBrunkhorst/core into…
AustinBrunkhorst Oct 2, 2022
a5d4471
Add callback import
AustinBrunkhorst Oct 2, 2022
4298f55
Merge branch 'home-assistant:dev' into snooz
AustinBrunkhorst Oct 6, 2022
1a274ae
Update homeassistant/components/snooz/fan.py
AustinBrunkhorst Oct 7, 2022
54f1cff
PR feedback
AustinBrunkhorst Oct 7, 2022
23154a5
Update homeassistant/components/snooz/config_flow.py
AustinBrunkhorst Oct 7, 2022
78cef5a
PR feedback
AustinBrunkhorst Oct 7, 2022
6900d23
PR feedback
AustinBrunkhorst Oct 7, 2022
e537d28
PR feedback
AustinBrunkhorst Oct 7, 2022
a23b88b
Update tests
AustinBrunkhorst Oct 7, 2022
d395cca
PR feedback
AustinBrunkhorst Oct 8, 2022
7aeb167
Make cancelled command a warning
AustinBrunkhorst Oct 8, 2022
5ab8d98
Update homeassistant/components/snooz/fan.py
AustinBrunkhorst Oct 8, 2022
616ef52
Remove log for cancelled command
AustinBrunkhorst Oct 8, 2022
b72fe81
Add test coverage
AustinBrunkhorst Oct 8, 2022
14c8ad7
Update .coveragerc
AustinBrunkhorst Oct 8, 2022
85daa02
Fix flake8 lint
AustinBrunkhorst Oct 8, 2022
e7dfbdb
Fix 0 percentage turn off
AustinBrunkhorst Oct 9, 2022
8efead9
Update homeassistant/components/snooz/fan.py
AustinBrunkhorst Oct 9, 2022
c76ddca
Update homeassistant/components/snooz/fan.py
AustinBrunkhorst Oct 9, 2022
c055f97
Update homeassistant/components/snooz/fan.py
AustinBrunkhorst Oct 9, 2022
0e7531b
Update translations
AustinBrunkhorst Oct 9, 2022
f2be643
Update tests
AustinBrunkhorst Oct 9, 2022
844c127
Update .strict-typing
AustinBrunkhorst Oct 9, 2022
1dcf1a3
Merge with upstream/dev
AustinBrunkhorst Oct 9, 2022
168978a
Update tests
AustinBrunkhorst Oct 10, 2022
35cd35e
Update pysnooz to 0.8.2
AustinBrunkhorst Oct 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove log for cancelled command
  • Loading branch information
AustinBrunkhorst committed Oct 8, 2022
commit 616ef52b5bef00a594781df06aea1b6decde15be
11 changes: 3 additions & 8 deletions homeassistant/components/snooz/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,9 @@ async def async_set_percentage(self, percentage: int) -> None:
async def _async_execute_command(self, command: SnoozCommandData) -> None:
result = await self._device.async_execute_command(command)

if result.status == SnoozCommandResultStatus.CANCELLED:
_LOGGER.debug(
"Command %s was cancelled after %s", command, result.duration
)
return

if result.status != SnoozCommandResultStatus.SUCCESSFUL:
if result.status == SnoozCommandResultStatus.SUCCESSFUL:
self._async_write_state_changed()
elif result.status != SnoozCommandResultStatus.CANCELLED:
raise HomeAssistantError(
f"Command {command} failed with status {result.status.name} after {result.duration}"
)
self._async_write_state_changed()