Commit Graph

10 Commits (03a6eb26bede9086c3fb12bd45f5324c05a404e5)

Author SHA1 Message Date
TimL 6b1fc00910
Improve handling of old firmware versions (#125406)
* Update Info fixture with new fields from pysmlight 0.0.14

* Create repair if device is running unsupported firmware

* Add test for legacy firmware info

* Add strings for repair issue
2024-09-06 09:46:08 -04:00
TimL 0eda451c24
Add Switch platform to Smlight integration (#125292)
* Add switch platform to Smlight

* Add strings for switch platform

* Add tests for Smlight switch platform

* Regenerate snapshot

* Address review comments

* Use is_on property for updating switch state

* Address review comments

---------

Co-authored-by: Tim Lunn <tim@feathertop.org>
2024-09-06 14:25:55 +02:00
Shay Levy ff20131af1
Use smlight discovery hostname as device name (#125359)
* Use smlight discovery hostname as device name

* Update reauth flow name

* Drop host from description
2024-09-06 11:49:10 +02:00
TimL a341bfd8ca
Add binary_sensor platform for Smlight integration (#125284)
* Support binary_sensors for SMLight integration

* Add strings for binary sensors

* Add tests for binary_sensor platform

* Update binary sensor docstring

Co-authored-by: Shay Levy <levyshay1@gmail.com>

* Regenerate snapshot

---------

Co-authored-by: Shay Levy <levyshay1@gmail.com>
Co-authored-by: Tim Lunn <tim@feathertop.org>
2024-09-06 08:11:50 +02:00
TimL 511ecf98d5
Add reauth flow for Smlight (#124418)
* Add reauth flow for smlight integration

* add strings for reauth

* trigger reauth flow on authentication errors

* Add tests for reauth flow

* test for update failed on auth error

* restore name title placeholder

* raise config entry error to trigger reauth

* Add test for reauth triggered at startup

---------

Co-authored-by: Tim Lunn <tim@feathertop.org>
2024-09-05 11:02:05 +02:00
Marc Mueller c8fd48523f
Use TypeVar defaults for Generator (#125228) 2024-09-04 18:10:21 -10:00
TimL f56c38d69b
Add uptime sensors for Smlight (#124408)
* Add uptime sensor as derived sensor class

* Add strings for uptime sensors

* Update sensor tests to include uptime sensors

* test zigbee uptime when disconnected
2024-09-04 20:31:56 +02:00
TimL 7266a16295
Add Button platform for Smlight integration (#124970)
* Add button platform for smlight integration

* Add strings required for button platform

* Add commands api to smlight mock client

* Add tests for smlight button platform

* Move entity category to class

* Disable by default Zigbee flash mode
2024-09-04 19:10:59 +02:00
TimL 5e93394ae7
Ensure smilight fixtures select correct platform for tests (#124305)
* Fix return type hint for setup_integration

* Ensure platform fixture selects tested platform
2024-08-30 16:25:30 +02:00
TimL 98a007cb2f
New Integration: SMLIGHT SLZB-06 Adapters Integration (#118675)
* Initial SMLIGHT integration

Signed-off-by: Tim Lunn <tl@smlight.tech>

* Generated content

Signed-off-by: Tim Lunn <tl@smlight.tech>

* Cleanup LOGGING

* Use runtime data

* Call super first

* coordinator instance attributes

* Move coordinatorEntity and attr to base class

* cleanup sensors

* update strings to use sentence case

* Improve reauth flow on incorrect credentials

* Use fixture for config_flow tests and test to completion

* Split uptime hndling into a new uptime sensor entity

* Drop server side events and internet callback

will bring this back with binary sensor Platform

* consolidate coordinator setup

* entity always include connections

* get_hostname tweak

* Add tests for init, coordinator and sensor

* Use custom type SmConfigEntry

* update sensor snapshot

* Drop reauth flow for later PR

* Use _async_setup for initial setup

* drop internet to be set later

* sensor fixes

* config flow re

* typing fixes

* Bump pysmlight dependency to 0.0.12

* dont trigger invalid auth message when first loading auth step

* Merge uptime sensors back into main sensor class

* clarify uptime handling

* Apply suggestions from code review

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* address review comments

* pass host as parameter to the dataCoordinator

* drop uptime sensors for a later PR

* update sensor test snapshot

* move coordinator unique_id to _async_setup

* fix CI

* Apply suggestions from code review

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* drop invalid_auth test tag

* use snapshot_platform, update fixtures

* Finish all tests with abort or create entry

* drop coordinator tests and remove hostname support

* add test for update failure on connection error

* use freezer for update_failed test

* fix pysmlight imports

---------

Signed-off-by: Tim Lunn <tl@smlight.tech>
Co-authored-by: Tim Lunn <tim@feathertop.org>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-08-20 10:44:06 +02:00