Commit graph

40 commits

Author SHA1 Message Date
J. Nick Koston
fb12c237ab
Restore xiaomi_ble state at start when device is in range or sleepy () 2023-08-07 07:58:27 -10:00
Ernst Klamer
0caeac1a82
Add support for toothbrushes to xiaomi-ble ()
* Add support for toothbrushes to xiaomi-ble

* use str for string
2023-08-05 23:13:21 +02:00
J. Nick Koston
28bebf338f
Fix xiaomi_ble not remembering a device is a sleepy device () 2023-07-31 01:02:36 -07:00
Ernst Klamer
28197adebd
Add support for sleepy Xiaomi BLE sensors () 2023-07-24 21:13:16 +02:00
Ernst Klamer
672313c8ab
Add support for MiScale V1 () 2023-07-23 13:11:05 +02:00
Ernst Klamer
0349e47372
Add support for MiScale V2 ()
* Add support for MiScale V2

* Add icon to impedance

* Reduce mass sensors
2023-07-20 10:01:19 +02:00
Erik Montnemery
7539cf25be
Don't require passing identifiers to DeviceRegistry.async_get_device ()
* Require keyword arguments to DeviceRegistry.async_get_device

* Update tests

* Update tests

* Don't enforce keyword arguments
2023-07-13 13:39:25 -04:00
Franck Nijhof
3e85a29b86
Move overlapping pylint rules to ruff, disable mypy overlap () 2023-06-27 17:42:46 +02:00
Ernst Klamer
7c02e1ca99
Bump xiaomi-ble to 0.17.2 ()
Bump xiaomi-ble

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-04 19:07:37 -05:00
J. Nick Koston
c3043fb0ee
Bump bluetooth deps for bleak 0.20 ()
Co-authored-by: K <z@kwi.li>
2023-03-20 12:06:15 +01:00
epenet
0f493d85c8
Adjust xiaomi_ble tests ()
Adjust xiaomi_ble test docstrings
2023-03-03 08:32:23 +01:00
epenet
9762b684c2
Adjust entity registry access in tests (3) () 2023-03-01 16:04:40 +01:00
epenet
5b80b1f55a
Add type hints to integration tests (part 25) () 2023-02-17 16:52:28 +01:00
Ernst Klamer
9dd806278b
Keep sleepy xiaomi-ble devices that don't broadcast regularly available ()
Co-authored-by: J. Nick Koston <nick@koston.org>
fixes undefined
2023-02-09 16:42:08 -06:00
epenet
278050a73f
Add type hints to integration tests (t-z) () 2023-02-08 19:10:53 +01:00
Franck Nijhof
ca1a12898c
Enable Ruff D212 () 2023-02-03 23:08:48 +01:00
Franck Nijhof
e50a531cd9
Code styling tweaks to the tests - Part 2 ()
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2023-01-26 01:23:53 +01:00
Ernst Klamer
886d2fc3a1
Add events for xiaomi-ble ()
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-01-24 08:48:30 -10:00
Ernst Klamer
171e114ec1
Add door, opening and motion sensors to Xiaomi-ble () 2023-01-03 08:21:28 -10:00
Aarni Koskela
e4c73259f7
Configure autoflake for pre-commit () 2022-11-22 08:10:36 +01:00
Ernst Klamer
af73afa2e2
Add support for HHCCJCY10 to xiaomi_ble () 2022-11-14 11:18:51 -06:00
J. Nick Koston
d12cbab6c4
Bump bleak to 0.19.0 () 2022-10-15 13:57:23 -04:00
J. Nick Koston
085abc74ee
Reduce overhead to update passive bluetooth devices () 2022-09-16 12:24:20 +02:00
J. Nick Koston
5f1979dbc3
Bump xiaomi-ble to 0.9.3 () 2022-09-12 16:54:20 -05:00
Jc2k
28f4a5b7a2
Add missing moisture sensor to xiaomi_ble () 2022-09-09 22:31:51 -04:00
J. Nick Koston
3938015c93
Add support for scanners that do not provide connectable devices () 2022-08-22 14:02:26 -04:00
Jc2k
46369b274b
Initial binary_sensor support for Xiaomi BLE () 2022-08-11 22:25:24 -10:00
J. Nick Koston
4f064268b0
Add missing _abort_if_unique_id_configured to ble integrations () 2022-08-11 13:55:52 -10:00
Jc2k
51ca74b3d1
Fix titles for discoveries and device names in xiaomi_ble () 2022-08-11 23:24:55 +01:00
Jc2k
6ad2708946
Support polling the MiFlora battery () 2022-08-11 10:10:18 +02:00
Jc2k
a0adfb9e62
Fix serialization of Xiaomi BLE reauth flow ()
* Use data instead of context to fix serialisation bug

* Test change to async_start_reauth
2022-08-02 21:38:38 +01:00
Jc2k
652a8e9e8a
Add reauth flow to xiaomi_ble, fixes problem adding LYWSD03MMC () 2022-08-01 22:04:16 +01:00
J. Nick Koston
80a9659524
Update to bleak 0.15 () 2022-07-29 17:53:33 -07:00
Jc2k
10356b9379
Fix Xiaomi BLE not detecting encryption for some devices () 2022-07-28 19:10:37 +01:00
Jc2k
f8b115dd9d
Add xiaomi_ble voltage, consumable and formaldehyde sensors ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-07-27 11:28:58 +01:00
Franck Nijhof
5e45b0baf9
Automatically set up Xiaomi BLE during onboarding () 2022-07-26 08:03:31 +01:00
Jc2k
e18819c678
Support for encrypted BLE MiBeacon devices ()
* Support for encrypted devices

* Sensor should use bindkey if available

* Error message if encryption fails

* Let mypy know this is always set by now

* Towards supporting encryption in step_user

* Add tests for the 4 new happy paths

* Add test coverage for failure cases

* Add strings

* Bump to 0.5.1. Legacy MiBeacon does not use an authentication token, so harder to detect incorrect key

* Add _title() helper

* Fix test after rebase

* Update homeassistant/components/xiaomi_ble/strings.json

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

* Remove unused lines

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-07-24 21:00:56 +02:00
J. Nick Koston
da131beced
Split bluetooth coordinator into two classes () 2022-07-23 19:33:47 -05:00
Jc2k
b60a59270c
Add support for rest of sensors for HHCCJCY01 () 2022-07-23 09:40:56 +01:00
Jc2k
402e533fef
Initial xiaomi_ble integration ()
* Initial xiaomi_ble integration

* black

* Update homeassistant/components/xiaomi_ble/config_flow.py

Co-authored-by: Ernst Klamer <e.klamer@gmail.com>

* Update homeassistant/components/xiaomi_ble/config_flow.py

Co-authored-by: Ernst Klamer <e.klamer@gmail.com>

* Apply suggestions from code review

Co-authored-by: Ernst Klamer <e.klamer@gmail.com>

* Update tests/components/xiaomi_ble/test_config_flow.py

Co-authored-by: Ernst Klamer <e.klamer@gmail.com>

* Update homeassistant/components/xiaomi_ble/sensor.py

Co-authored-by: Ernst Klamer <e.klamer@gmail.com>

* Update tests/components/xiaomi_ble/test_config_flow.py

Co-authored-by: Ernst Klamer <e.klamer@gmail.com>

* Remove debug code

* Need 'proper' MAC when running tests on linux

* Need to use proper MAC so validation passes

* Add tests for already_in_progress and already_configured

* copy test, add session fixture

* fix test

Co-authored-by: Ernst Klamer <e.klamer@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-07-23 00:55:06 +02:00