Commit graph

21 commits

Author SHA1 Message Date
Marc Mueller
972eb34ed9
Improve bluetooth generic typing (#84891)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-01-02 21:19:53 -10:00
J. Nick Koston
074dec36ad
Add foundation for passive scanning support to switchbot (#84260) 2022-12-19 16:55:18 -10:00
J. Nick Koston
7c13e7cdfd
Use a single source of data for switchbot (#84215) 2022-12-19 07:47:42 -10:00
J. Nick Koston
884fbdd5ce
Bump PySwitchbot to 0.29.1 (#84119)
fixes https://github.com/home-assistant/core/issues/82795
closes https://github.com/home-assistant/core/issues/78562
2022-12-18 14:54:29 -10:00
J. Nick Koston
ad992f0a86
Fix switchbot not becoming available again after unavailable (#81822)
* Fix switchbot not becoming available again after unavailable

If the advertisment was the same and we were previously
marked as unavailable we would not mark the device as
available again until the advertisment changed. For lights
there is a counter but for the bots there is no counter
which means the bots would show unavailable even though
they were available again

* naming

* naming
2022-11-09 08:09:06 +01:00
J. Nick Koston
bbe63bca47
Bump pySwitchbot to 0.20.0 for bleak 0.19 changes (#80389) 2022-10-16 15:16:02 +03:00
J. Nick Koston
d12cbab6c4
Bump bleak to 0.19.0 (#80349) 2022-10-15 13:57:23 -04:00
J. Nick Koston
b8ccf53799
Fix switchbot not accepting the first advertisement (#78610) 2022-09-17 23:45:04 -04:00
J. Nick Koston
d98ed03845
Fix switchbot writing state too frequently (#78094) 2022-09-09 18:13:27 -05:00
J. Nick Koston
795691038f
Add light platform to switchbot (#77430) 2022-08-29 09:30:09 -05:00
J. Nick Koston
3938015c93
Add support for scanners that do not provide connectable devices (#77132) 2022-08-22 14:02:26 -04:00
J. Nick Koston
4a5a039984
Use async_timeout instead of asyncio.wait_for in switchbot (#76630) 2022-08-11 21:10:59 -04:00
J. Nick Koston
b1497b0857
Simplify switchbot config flow (#76272) 2022-08-10 09:02:08 -10:00
J. Nick Koston
80a9659524
Update to bleak 0.15 (#75941) 2022-07-29 17:53:33 -07:00
Paulus Schoutsen
4b2beda473
Move some bleak imports to be behind TYPE_CHECKING (#75894) 2022-07-28 22:26:37 -07:00
J. Nick Koston
d890598da7
Update PySwitchbot to improve connection reliability (#75692) 2022-07-24 16:38:07 -05:00
J. Nick Koston
198167a2c8
Update switchbot to be local push (#75645)
* Update switchbot to be local push

* fixes

* fixes

* fixes

* fixes

* adjust

* cover is not assumed anymore

* cleanups

* adjust

* adjust

* add missing cover

* import compat

* fixes

* uses lower

* uses lower

* bleak users upper case addresses

* fixes

* bump

* keep conf_mac and deprecated options for rollback

* reuse coordinator

* adjust

* move around

* move around

* move around

* move around

* refactor fixes

* compat with DataUpdateCoordinator

* fix available

* Update homeassistant/components/bluetooth/passive_update_processor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/bluetooth/passive_update_coordinator.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/bluetooth/update_coordinator.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Split bluetooth coordinator into PassiveBluetoothDataUpdateCoordinator and PassiveBluetoothProcessorCoordinator

The PassiveBluetoothDataUpdateCoordinator is now used to replace instances
of DataUpdateCoordinator where the data is coming from bluetooth
advertisements, and the integration may also mix in active updates

The PassiveBluetoothProcessorCoordinator is used for integrations that
want to process each bluetooth advertisement with multiple processors
which can be dispatched to individual platforms or areas or the integration
as it chooes

* change connections

* reduce code churn to reduce review overhead

* reduce code churn to reduce review overhead

* Update homeassistant/components/bluetooth/passive_update_coordinator.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* add basic test

* add basic test

* complete coverage

* Update homeassistant/components/switchbot/coordinator.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/switchbot/coordinator.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/switchbot/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/switchbot/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* lint

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-07-24 11:38:45 -05:00
Diogo F. Andrade Murteira
148f963510
Add Switchbot hygrometers (#75325)
* Switchbot add support for hygrometers

* Update CODEOWNERS

* Improve debug

* Remove redundant mention to temp unit

* Adopt FlowResultType

* Modify SwitchBot data within coordinator

* Increase logging for switchbot sensor

* Revert "Increase logging for switchbot sensor"

This reverts commit d8b377429c.

Co-authored-by: J. Nick Koston <nick@koston.org>
2022-07-22 11:03:02 -05:00
RenierM26
10ea88e0ea
Switchbot bump Dependency 0.14.0 (#74001)
* Bump requirement.

* Switchbot depenacy update, full async.

* Update tests, remove redundant config entry check.

* Update requirements_test_all.txt

* Update requirements_all.txt

* Remove asyncio lock. Not required anymore with bleak.

* Update requirements_all.txt

* Update requirements_test_all.txt

* pyswitchbot no longer uses bluepy
2022-06-27 13:56:51 +02:00
RenierM26
012e005e0d
Store SB data Class. (#59266) 2021-11-09 07:00:51 +01:00
RenierM26
3ce8109e5e
Add config flow to Switchbot (#50653)
Co-authored-by: Daniel Hjelseth Høyer <mail@dahoiv.net>
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-18 09:25:05 -10:00