Commit Graph

6 Commits (19e6867f1ae078d84ff3e1973d703c4b86504b89)

Author SHA1 Message Date
TimL f98b1d248a
Add diagnostics platform to Smlight (#126423)
* Add diagnostics for Smlight

* test diagnostics

* Add log fixture and snapshot

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-22 16:04:36 +02:00
TimL 4f53ffcd9c
Add VPN sensor and switch for Smlight integration (#126201)
* Add vpn_status sensor

* update test fixures with new attributes

* Add vpn enabled switch

vpn strings

* Add vpn switch to test

* update snapshots

* Add vpn status to disabled by default test
2024-09-18 11:40:27 +02:00
TimL e9364f4c3a
Add update platform for Smlight integration (#125943)
* Create update coordinator for update entities

* fix type errors

* update info fixture with zigbee version

* Add fixtures for Firmware objects

* mock get_firmware_version function

* Add update platform for Smlight integration

* Add strings for update platform

* Add tests for update platform

* add snapshot for update tests

* Split out base coordinator

* Update homeassistant/components/smlight/strings.json

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

* overwrite coordinator types

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-16 14:14:15 +02:00
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
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