Commit Graph
17609 Commits
Author SHA1 Message Date
Erik MontnemeryandGitHub ab060b86d1 Remove async_process_integration_platform_for_component (#100680) 2023-09-21 17:06:41 +02:00
Luke LashleyandGitHub e2bfa9f9cd Add last clean sensors to Roborock (#100661)
* Add water shortage binary sensor

* add last clean sensors

* fix tests

* fix tests again

* remove accidentally added binary sensor
2023-09-21 16:00:15 +02:00
Luke LashleyandGitHub 6e0ab35f85 Add water shortage binary sensor (#100662) 2023-09-21 15:43:17 +02:00
c170babba6 Add ecoforest integration (#100647)
* Add ecoforest integration

* fix file title

* remove host default from schema, hints will be given in the documentation

* moved input validation to async_step_user

* ensure we can receive device data while doing entry setup

* remove unecessary check before unique id is set

* added shorter syntax for async create entry

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

* use variable to set unique id

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

* Use _attr_has_entity_name from base entity

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

* remove unecessary comments in coordinator

* use shorthand for device information

* remove empty objects from manifest

* remove unecessary flag

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

* use _async_abort_entries_match to ensure device is not duplicated

* remove unecessary host attr

* fixed coordinator host attr to be used by entities to identify device

* remove unecessary assert

* use default device class temperature trasnlation key

* reuse base entity description

* use device serial number as identifier

* remove unused code

* Improve logging message

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

* Remove unused errors

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

* Raise a generic update failed

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

* use coordinator directly

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

* No need to check for serial number

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

* rename variable

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

* use renamed variable

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

* improve assertion

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

* use serial number in entity unique id

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

* raise config entry not ready on setup when error in connection

* improve test readability

* Improve python syntax

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

* abort when device already configured with same serial number

* improve tests

* fix test name

* use coordinator data

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

* improve asserts

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

* fix ci

* improve error handling

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-09-21 15:18:55 +02:00
Jan BouwhuisandGitHub aed3ba3acd Avoid redundant calls to async_ha_write_state in MQTT (binary) sensor (#100438)
* Only call `async_ha_write_state` on changes.

* Make helper class

* Use UndefinedType

* Remove del

* Integrate monitor into MqttEntity

* Track extra state attributes and availability

* Add `__slots__`

* Add monitor to MqttAttributes and MqttAvailability

* Write out loop

* Add test

* Make common test and parameterize

* Add test for last_reset attribute

* MqttMonitorEntity base class

* Rename attr and update docstr `track` method.

* correction doct

* Implement as a decorator

* Move tracking functions into decorator

* Rename decorator

* Follow up comment
2023-09-21 13:33:26 +02:00
FletcherandGitHub 11c4c37cf9 Add Slack thread/reply support (#93384) 2023-09-21 11:06:55 +02:00
715d8dcb98 Add test to london underground (#100562)
Co-authored-by: Robert Resch <robert@resch.dev>
2023-09-21 10:44:32 +02:00
J. Nick KostonandGitHub 59daceafd2 Avoid calling extract_stack in system_log since it does blocking I/O (#100455) 2023-09-21 09:48:41 +02:00
J. Nick KostonandGitHub a03ad87cfb Avoid ConfigEntry lookups in hass.config_entries.async_entries for domain index (#100598) 2023-09-20 18:43:15 +02:00
J. Nick KostonandGitHub ec5675ff4b Fix hkid matching in homekit_controller when zeroconf value is not upper case (#100641) 2023-09-20 17:37:13 +02:00
Luke LashleyandGitHub 77001b26de Add second test device for Roborock (#100565) 2023-09-20 17:17:32 +02:00
J. Nick KostonandGitHub 6f8734167f Bump SQLAlchemy to 2.0.21 (#99745) 2023-09-20 16:19:53 +02:00
bd9bab000e Add integration for IKEA Idasen Desk (#99173)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-20 02:44:35 +02:00
elmuratoandGitHub f1a70189ac Clean-up Minecraft Server tests (#100615)
Remove patching of getmac, fix typo
2023-09-19 22:14:21 +02:00
J. Nick KostonandGitHub 0eca433004 Update zeroconf discovery to use IPAddress objects to avoid conversions (#100567) 2023-09-19 18:58:46 +02:00
IanandGitHub c3f74ae022 Add config-flow to NextBus (#92149) 2023-09-19 17:10:29 +02:00
Marc MuellerandGitHub 37288d7788 Add pylint plugin to check for calls to base implementation (#100432) 2023-09-18 13:39:36 -05:00
rappenzeandGitHub ddd62a8f63 Fibaro streamline hass.data entry (#100547)
* Fibaro streamline hass.data entry

* Fix tests
2023-09-18 20:22:23 +02:00
Ville SkyttäandGitHub 902f997ee0 Fix google invalid token expiry test init for UTC offsets > 0 (#100533)
```
$ python3 -q
>>> import datetime, time
>>> time.tzname
('EET', 'EEST')
>>> datetime.datetime.max.timestamp()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: year 10000 is out of range
```
2023-09-18 12:39:43 +03:00
Marc MuellerandGitHub f41e3a2beb Remove duplicate mobile_app client fixture (#100530) 2023-09-18 10:52:43 +02:00
Maciej BieniekandGitHub f6243a1f79 Add event platform for Shelly gen2 devices (#99659)
* Add event platform for gen2 devices

* Add tests

* Add removal condition

* Simplify RpcEventDescription; fix availability

* Improve names and docstrings

* Improve the event entity name

* Use async_on_remove()

* Improve tests coverage

* Improve tests coverage

* Prefix the entity name with the device name in the old way

* Black

* Use DeviceInfo object
2023-09-18 00:38:08 +02:00
jan iversenandGitHub 9931f45532 Deprecate modbus parameter retry_on_empty (#100292) 2023-09-16 21:14:52 +02: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 <nick@koston.org>

* Update homeassistant/components/switchbot_via_api/switch.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/switchbot_via_api/switch.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Review fixes

* Apply suggestions from code review

Co-authored-by: J. Nick Koston <nick@koston.org>

* 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 <nick@koston.org>

* Review changes

* Adding strict typing

* Removing log in constructor

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-16 16:00:41 +02:00
jan iversenandGitHub 568974fcc4 Modbus 100% test coverage (again) (#100482) 2023-09-16 14:00:22 +02:00
Jan-Philipp BeneckeandGitHub 57337b5cee Move flipr coordinator to its own file (#100467) 2023-09-16 11:19:49 +02:00
Jan-Philipp BeneckeandGitHub 024db6dadf Move cert_expiry coordinator to its own file (#100472)
* Move cert_expiry coordinator to its own file

* Add missing patched config flow test
2023-09-16 11:19:05 +02:00
jan iversenandGitHub d25f45a957 Harden modbus against lib errors (#100469) 2023-09-16 09:57:55 +02:00
jan iversenandGitHub fd83f7d87f Add test for modbus CONF_DEVICE_ADDR (#100435) 2023-09-15 16:12:44 +02:00
jan iversenandGitHub 9eb0b844bc Test VIRTUAL_COUNT parameter (#100434) 2023-09-15 15:02:24 +02:00
Joost LekkerkerkerandGitHub 1737b27dd4 Generate withings webhook ID in config flow (#100395) 2023-09-15 12:58:56 +02:00
Erik MontnemeryandGitHub d1afcd773f Revert "Cache entity properties that are never expected to change in the base class" (#100422)
Revert "Cache entity properties that are never expected to change in the base class (#95315)"

This reverts commit 042776ebb8.
2023-09-15 11:25:24 +02:00
J. Nick KostonandGitHub 042776ebb8 Cache entity properties that are never expected to change in the base class (#95315) 2023-09-14 17:48:48 -05:00
jan iversenandGitHub d4a2927ebe Solve racing problem in modbus test (#100287)
* Test racing problem.

* review comment.

* Revert to approved state.

This reverts commit 983d9d68e8.
2023-09-14 16:03:32 +02:00
Joost LekkerkerkerandGitHub 6fc1407613 Extract Withings API specifics in own class (#100363)
* Extract Withings API specifics in own class

* Extract Withings API specifics in own class

* Ignore api test coverage

* fix feedback
2023-09-14 13:31:54 +02:00
Ståle Storø HauknesandGitHub b858658516 Fix Airthings ble migration (#100362)
* Import Platform for tests

* Migration bugfix

* Store new unique id as a variable in tests

* Add comments to tests
2023-09-14 12:51:06 +02:00
Marty SunandGitHub 6692a37f0d Add missing __init__.py file in yardian test folder (#100345) 2023-09-14 09:04:12 +02:00
c265d3f3cc Late review for honeywell (#100299)
* Late review for honeywell

* Actually test same id different domain

* Update homeassistant/components/honeywell/climate.py

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

* Update climate.py

* Refactor dont_remove

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-09-14 06:22:28 +02:00
J. Nick KostonandGitHub 547f32818c Make core States use cached_property (#100312)
Need to validate this is worth removing __slots__
2023-09-13 20:33:25 -04:00
J. Nick KostonandGitHub fe5eba9b31 Use cached_property in device registry (#100309) 2023-09-13 15:36:07 -05:00
Jan-Philipp BeneckeandGitHub 7b204ca36b Use snapshot assertion for nexia diagnostics test (#100328) 2023-09-13 15:00:29 -05:00
J. Nick KostonandGitHub 877eedf6d7 Use cached_property in entity_registry (#100302) 2023-09-13 14:38:40 -05:00
QuentameandGitHub 8625bf7894 Add some tests to Freebox (#99755) 2023-09-13 20:22:47 +02:00
Robert SvenssonandGitHub 7b00265cfe Remove legacy UniFi PoE client clean up (#100318) 2023-09-13 20:14:03 +02:00
ee65aa91e8 Allow setting the elevation in set_location (#99978)
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-09-13 18:09:12 +02:00
Joost LekkerkerkerandGitHub f6b094dfee Add options flow to Withings (#100300) 2023-09-13 18:08:15 +02:00
Erik MontnemeryandGitHub 6057fe5926 Replace StateMachine._domain_index with a UserDict (#100270)
* Replace StateMachine._domain_index with a UserDict

* Access the UserDict's backing dict directly

* Optimize
2023-09-13 18:05:17 +02:00
Joost LekkerkerkerandGitHub 8498cdfb3c Remove profile from Withings config flow (#100202)
* Remove profile from Withings config flow

* Add config flow migration

* Add config flow migration

* Remove datamanager profile

* Remove datamanager profile

* Add manufacturer

* Remove migration

* Remove migration

* Fix feedback
2023-09-13 15:49:36 +02:00
starkillerOGandGitHub 80aa19263b Netgear catch no info error (#100212) 2023-09-13 15:32:03 +02:00
Franck NijhofandGitHub afa0152261 Update syrupy to 4.5.0 (#100283) 2023-09-13 14:40:01 +02:00
Joost LekkerkerkerandGitHub 38e013a90e Remove NZBGet configurable scan interval (#98869) 2023-09-13 14:15:40 +02:00