Commit Graph
26 Commits
Author SHA1 Message Date
Samuel XiaoandGitHub 260ca70785 Add Light platform to Switchbot cloud (#146382) 2025-07-30 15:03:13 +02:00
Samuel XiaoandGitHub 69e3a5bc34 Add support for more switchbot cloud vacuum models (#146637) 2025-07-30 15:02:37 +02:00
cd94685b7d Add Fan platform to Switchbot cloud (#148304)
Co-authored-by: Joost Lekkerkerker <[email protected]>
2025-07-15 13:55:13 +02:00
daa4ddabfe Switchbot Cloud: Fix device type filtering in sensor (#146945)
* Add Smart Lock Ultra support and fix device type filtering in sensor integration

* Adding fix in binary sensor

* Fix

---------

Co-authored-by: Joostlek <[email protected]>
2025-06-22 14:12:09 +02:00
epenetandGitHub 54c20d5d5a Use async_load_fixture in remaining tests (#146021) 2025-06-03 10:52:51 +02:00
Samuel XiaoandGitHub 6d11c0395f Bump switchbot-api to 2.4.0 (#145786)
* update switchbot-api version to 2.4.0

* debug for test code
2025-05-30 20:22:40 +02:00
Abílio CostaandGitHub b626204f63 Add default device class display precision for Sensor (#145013)
* Add default device class display precision for Sensor

* Renaming, docstrings, cleanup

* Simplify units list

* Fix tests

* Fix missing precision when suggested is specified

* Update snapshots

* Fix when unit of measurement is not valid

* Fix tests

* Fix deprecated unit usage

* Fix goalzero tests

The sensor native_value method was accessing the data dict and trowing,
since the mock did not have any data for the sensors.

Since now the precision is always specified (it was missing for those
sensors), the throw was hitting async_update_entity_options in _update_suggested_precision.
Previously, async_update_entity_options was not called since it had no
precision.

* Fix metoffice

* Fix smartthings

* Add default sensor data for Tesla Wall Connector tests

* Update snapshots

* Revert spaces

* Update smartthings snapshots

* Add missing sensor mock for tesla wall connector

* Address review comments

* Add doc comment

* Add cap to doc comment

* Update comment

* Update snapshots

* Update comment
2025-05-26 19:40:29 +02:00
Erik MontnemeryandGitHub 4e1d5fbeb0 Add WS command to help reset custom entity_id (#145504)
* Add WS command to help reset custom entity_id

* Calculate suggested object id from entity properties

* Fix logic and add additional tests

* Adjust test

* Update folder_watcher test

* Handle current entity id matches the automatic entity id

* Don't store calculated_object_id

* Update snapshots

* Update snapshots

* Update test

* Tweak logic for reusing current entity_id

* Improve test

* Don't assign same entity_id to several entities

* Prioritize custom entity name

* Update snapshots

* Update snapshots
2025-05-26 19:28:27 +02:00
c68e663a1c Add webhook in switchbot cloud integration (#132882)
* add webhook in switchbot cloud integration

* Rename _need_initialized to _is_initialized and reduce nb line in async_setup_entry

* Add unit tests

* Enhance poll management

* fix

---------

Co-authored-by: Joostlek <[email protected]>
2025-05-22 12:19:08 +02:00
Simone ChemelliandGitHub 484a547758 Fix pylance warning on SnapshotAssertion import (#145206) 2025-05-19 13:55:48 +02:00
Manuel RügerandGitHub bdd9099294 switchbot_cloud: Add firmware information (#143693) 2025-04-30 14:48:18 +02:00
4b34d1bbb5 Merge config subentry feature branch to dev (#136121)
* Reapply "Add support for subentries to config entries" (#133470) (#136061)

* Reapply "Add support for subentries to config entries" (#133470)

This reverts commit ecb3bf79f3.

* Update test snapshot

* Add config subentry support to device registry (#128157)

* Add config subentry support to device registry

* Apply suggestions from code review

* Update syrupy serializer

* Update snapshots

* Address review comments

* Allow a device to be connected to no or a single subentry of a config entry

* Update snapshots

* Revert "Allow a device to be connected to no or a single subentry of a config entry"

This reverts commit ec6f613151cb4a806b7961033c004b71b76510c2.

* Update test snapshots

* Bump release version in comments

* Rename config_subentries to config_entries_subentries

* Add config subentry support to entity registry (#128155)

* Add config subentry support to entity registry

* Update syrupy serializer

* Update snapshots

* Update snapshots

* Accept suggested changes

* Clean registries when removing subentry (#136671)

* Clean up registries when removing subentry

* Update tests

* Clean up subentries from deleted devices when removing config entry (#136669)

* Clean up subentries from deleted devices when removing config entry

* Move

* Add config subentry support to entity platform (#128161)

* Add config subentry support to entity platform

* Rename subentry_id to config_subentry_id

* Store subentry type in subentry (#136687)

* Add reconfigure support to config subentries (#133353)

* Add reconfigure support to config subentries

* Update test

* Minor adjustment

* Rename supported_subentry_flows to supported_subentry_types

* Address review comments

* Add subentry support to kitchen sink (#136755)

* Add subentry support to kitchen sink

* Add subentry reconfigure support to kitchen_sink

* Update kitchen_sink tests with subentry type stored in config entry

* Update kitchen_sink

* Update kitchen_sink

* Adjust kitchen sink tests

* Fix hassfest

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <[email protected]>

* Improve docstrings and strings.json

---------

Co-authored-by: Martin Hjelmare <[email protected]>

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

---------

Co-authored-by: Martin Hjelmare <[email protected]>
2025-02-10 16:40:07 +01:00
Mick Montorier-AbermanandGitHub eded99a059 Add tests for sensors in SwitchBot Cloud (#137319) 2025-02-05 12:51:27 +00:00
Mick Montorier-AbermanandGitHub 33a2fa2c85 Add support for Bot in SwitchBot Cloud (#135606) 2025-01-21 12:08:38 +00:00
Mick Montorier-AbermanandGitHub 41fe863b72 Refactor SwitchBot Cloud make_device_data (#135698) 2025-01-19 14:22:21 +01:00
greyeeeandGitHub be25cb7aa7 Add support for SwitchBot Relay Switch 1 and Relay Switch 1PM (#132327) 2024-12-18 13:19:45 +01:00
Erik ElkinsandGitHub 388c5807ea Add Switchbot Hub 2, Switchbot Meter Pro and Switchbot Meter Pro (CO2) devices to Switchbot Cloud integration. (#130295) 2024-11-11 16:10:52 +01:00
2da0a91a36 Add lock to switchbot_cloud (#115128)
Co-authored-by: Ravaka Razafimanantsoa <[email protected]>
Co-authored-by: Robert Resch <[email protected]>
2024-10-25 20:09:14 +02:00
Marc MuellerandGitHub f11b316dac Import Generator from collections.abc (4) (#120917) 2024-07-01 11:54:42 +02:00
Marc MuellerandGitHub 837ee7c4fb Import Generator from typing_extensions (4) (#118992) 2024-06-06 17:41:37 +02:00
epenetandGitHub 9204ccfa17 Use is in ConfigEntryState enum comparison in tests (N-Z) (#114926) 2024-04-05 17:37:00 +02:00
Joost LekkerkerkerandGitHub ee66f6ec8c Use is in enum comparison in config flow tests P-T (#114675) 2024-04-02 11:21:50 -10:00
Marc MuellerandGitHub aa16a9d707 Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +01:00
Marc MuellerandGitHub 7d6251ca08 Add empty line after module docstring [tests q-s] (#112711) 2024-03-08 14:47:22 +01:00
Ravaka RazafimanantsoaandGitHub 7038bd67f7 Add Climate to switchbot cloud integration (#101660) 2023-10-24 23:46:00 -05:00
f99dedfb42 Add switchbot cloud integration (#99607)
* Switches via API

* Using external library

* UT and checlist

* Updating file .coveragerc

* Update homeassistant/components/switchbot_via_api/switch.py

Co-authored-by: J. Nick Koston <[email protected]>

* Update homeassistant/components/switchbot_via_api/switch.py

Co-authored-by: J. Nick Koston <[email protected]>

* Update homeassistant/components/switchbot_via_api/switch.py

Co-authored-by: J. Nick Koston <[email protected]>

* Review fixes

* Apply suggestions from code review

Co-authored-by: J. Nick Koston <[email protected]>

* This base class shouldn't know about Remote

* Fixing suggestion

* Sometimes, the state from the API is not updated immediately

* Review changes

* Some review changes

* Review changes

* Review change: Adding type on commands

* Parameterizing some tests

* Review changes

* Updating .coveragerc

* Fixing error handling in coordinator

* Review changes

* Review changes

* Adding switchbot brand

* Apply suggestions from code review

Co-authored-by: J. Nick Koston <[email protected]>

* Review changes

* Adding strict typing

* Removing log in constructor

---------

Co-authored-by: J. Nick Koston <[email protected]>
2023-09-16 16:00:41 +02:00