austinbrunkhorst / snooz Goto Github PK
View Code? Open in Web Editor NEWHome Assistant component to control SNOOZ white noise machine
License: MIT License
Home Assistant component to control SNOOZ white noise machine
License: MIT License
So I actually just picked up a long range Bluetooth adapter for my Home Assistant Core installation this weekend, and got this custom integration working (for the most part, and ignoring connectivity issues that I assume are mostly related to the Snooz and/or other bluetooth issues).
However, I did just install Home Assistant 2022.9 (was running 2022.8.7 when I originally installed the Snooz integration and had it working) and am now unable to start this integration. I tried deleting the device and integration to start from scratch, but I still get the following error showing up in Home Assistant's logs after re-configuring my Snooz w/this integration. It seems to pair normally, but then the integration just errors out after that:
Error setting up entry Snooz A516 for snooz Traceback (most recent call last): File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/config_entries.py", line 357, in async_setup result = await component.async_setup_entry(hass, self) File "/home/homeassistant/.homeassistant/custom_components/snooz/__init__.py", line 36, in async_setup_entry coordinator = PassiveBluetoothProcessorCoordinator( TypeError: PassiveBluetoothProcessorCoordinator.__init__() missing 1 required positional argument: 'update_method'
Either way, thank you so much for working on this integration @AustinBrunkhorst! Can't wait to see it become an official part of Hass =)
Fan entities are registered in Home Assistant but not responding to commands from within Home Assistant.
Originally posted by @strikeir13 in #1 (comment)
Adding a snooz
fan entity causes performance degradation across Home Assistant.
Originally posted by @strikeir13 in #1 (comment)
https://www.home-assistant.io/blog/2022/07/06/release-20227/#breaking-changes
Based on the breaking change introduced in 2022.7, is there any possibility of this integration being updated to use the suggested Bleak bluetooth library?
Creating an issue to discuss the release of Home Assistant 2022.10 and active bluetooth proxy connections with ESPHome.
Started from #6 (comment)
Thanks for this, I'd love to be able to tie our snooz into our morning HA routine! However, after installing and restarting HA, I ran into this error:
2021-04-22 08:06:44 ERROR (MainThread) [homeassistant.components.fan] Error while setting up snooz platform for fan
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 205, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/snooz/fan.py", line 47, in async_setup_platform
async_add_entities([SnoozFan(hass, name, address, device)])
File "/config/custom_components/snooz/fan.py", line 54, in __init__
self.id = "".join(self._address.split(":")[-2:])
AttributeError: 'SnoozFan' object has no attribute '_address'
Other installation notes:
Added config snippet:
- platform: snooz
address: D0:CF:5E:33:07:C8
Hey,
I stumbled on this and I am really excited to try it out. I have 3 of these gems, and have always hated the native app.
I am struggling to get it working properly and was wondering how to troubleshoot? I was able to get mine working for a few minutes and then it stopped responding and has not responded since. I tried adding my son's... that doesn't work either.
I was not able to see anything in the logs
I'm sure this is an easy fix - the manifest now needs a version key or else HA (as of 2021.6) won't load the integration. Here's the error at startup:
2021-06-08 09:19:08 ERROR (SyncWorker_0) [homeassistant.loader] The custom integration 'snooz' does not have a valid version key (None) in the manifest file and was blocked from loading. See https://developers.home-assistant.io/blog/2021/01/29/custom-integration-changes#versions for more details
Here's the relevant section in the developer docs:
https://developers.home-assistant.io/blog/2021/01/29/custom-integration-changes/#versions
And here's screenshot of a valid manifest file which includes the version key, from the wyzesense custom component:
(Note: I first noticed this prior to upgrading to 2021.5.0)
I've left this component installed even though I know the distance between my snooz and HA box is currently too far, and I've noticed a HA error in the startup logs:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config.py", line 853, in async_process_component_config
platform = p_integration.get_platform(domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 493, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 498, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.snooz.fan'
While I initially thought this was due to the snooz being out of range, I upgraded to 2021.5.0 today, and while I was able to upgrade, I could not restart HA until I removed the fan section from my configuration. The built-in configuration checker notes the error and the server restart will not trigger until the fan section of the config is removed.
2021-05-05 14:05:17 ERROR (MainThread) [homeassistant.components.hassio] Platform error fan.snooz - No module named 'custom_components.snooz.fan'
There are some relevant release notes regarding the restart prevention: https://www.home-assistant.io/blog/2021/05/05/release-20215/#why-home-assistant-didnt-restart-when-i-pressed-the-restart-button
Once the fan section of the config is removed, HA restarts normally. However, even on a reinstall of this component, HA gives the above errors even when using the suggested yaml from the README.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.