Commit Graph

17715 Commits (9fdc8494b698196306b3d3d199d09ed368b31718)

Author SHA1 Message Date
Jan Bouwhuis 87ae5add8a
Fix mqtt light rgbww update without state topic (#100707)
* Fix mqtt light rgbww update without state topic

* Add @callback decprator and correct mired conv
2023-09-22 13:31:29 +02:00
Jan Bouwhuis a66ad39c4e
Assign color_mode for mqtt light as ColorMode (#100709) 2023-09-22 12:09:37 +02:00
Jan Bouwhuis 384adb1c87
Avoid redundant calls to `async_write_ha_state` in MQTT climate & water_heater (#100696)
Limit state writes for mqtt climate & water_heater
2023-09-22 11:22:57 +02:00
Jan Bouwhuis 1041610a70
Avoid redundant calls to `async_write_ha_state` in MQTT mqtt alarm_control_panel (#100691)
Limit state writes for mqtt alarm_control_panel
2023-09-22 11:22:09 +02:00
J. Nick Koston 1dadfcd52c
Avoid polling in sun sensor entities (#100693) 2023-09-22 11:16:37 +02:00
Bouwe Westerdijk 5cf5f5b4cf
Add missing step-differentiation for the Plugwise temperature_offset (#100654) 2023-09-21 19:31:53 +02:00
Erik Montnemery ab060b86d1
Remove async_process_integration_platform_for_component (#100680) 2023-09-21 17:06:41 +02:00
Luke Lashley 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 Lashley 6e0ab35f85
Add water shortage binary sensor (#100662) 2023-09-21 15:43:17 +02:00
Pedro Januário 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 Bouwhuis 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
Fletcher 11c4c37cf9
Add Slack thread/reply support (#93384) 2023-09-21 11:06:55 +02:00
Jan-Philipp Benecke 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 Koston 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 Koston a03ad87cfb
Avoid ConfigEntry lookups in hass.config_entries.async_entries for domain index (#100598) 2023-09-20 18:43:15 +02:00
J. Nick Koston ec5675ff4b
Fix hkid matching in homekit_controller when zeroconf value is not upper case (#100641) 2023-09-20 17:37:13 +02:00
Luke Lashley 77001b26de
Add second test device for Roborock (#100565) 2023-09-20 17:17:32 +02:00
J. Nick Koston 6f8734167f
Bump SQLAlchemy to 2.0.21 (#99745) 2023-09-20 16:19:53 +02:00
Abílio Costa 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
elmurato f1a70189ac
Clean-up Minecraft Server tests (#100615)
Remove patching of getmac, fix typo
2023-09-19 22:14:21 +02:00
J. Nick Koston 0eca433004
Update zeroconf discovery to use IPAddress objects to avoid conversions (#100567) 2023-09-19 18:58:46 +02:00
Ian c3f74ae022
Add config-flow to NextBus (#92149) 2023-09-19 17:10:29 +02:00
Marc Mueller 37288d7788
Add pylint plugin to check for calls to base implementation (#100432) 2023-09-18 13:39:36 -05:00
rappenze ddd62a8f63
Fibaro streamline hass.data entry (#100547)
* Fibaro streamline hass.data entry

* Fix tests
2023-09-18 20:22:23 +02:00
Ville Skyttä 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 Mueller f41e3a2beb
Remove duplicate mobile_app client fixture (#100530) 2023-09-18 10:52:43 +02:00
Maciej Bieniek 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 iversen 9931f45532
Deprecate modbus parameter retry_on_empty (#100292) 2023-09-16 21:14:52 +02:00
Ravaka Razafimanantsoa 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 iversen 568974fcc4
Modbus 100% test coverage (again) (#100482) 2023-09-16 14:00:22 +02:00
Jan-Philipp Benecke 57337b5cee
Move flipr coordinator to its own file (#100467) 2023-09-16 11:19:49 +02:00
Jan-Philipp Benecke 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 iversen d25f45a957
Harden modbus against lib errors (#100469) 2023-09-16 09:57:55 +02:00
jan iversen fd83f7d87f
Add test for modbus CONF_DEVICE_ADDR (#100435) 2023-09-15 16:12:44 +02:00
jan iversen 9eb0b844bc
Test VIRTUAL_COUNT parameter (#100434) 2023-09-15 15:02:24 +02:00
Joost Lekkerkerker 1737b27dd4
Generate withings webhook ID in config flow (#100395) 2023-09-15 12:58:56 +02:00
Erik Montnemery 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 Koston 042776ebb8
Cache entity properties that are never expected to change in the base class (#95315) 2023-09-14 17:48:48 -05:00
jan iversen 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 Lekkerkerker 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ø Hauknes 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 Sun 6692a37f0d
Add missing __init__.py file in yardian test folder (#100345) 2023-09-14 09:04:12 +02:00
mkmer 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 Koston 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 Koston fe5eba9b31
Use cached_property in device registry (#100309) 2023-09-13 15:36:07 -05:00
Jan-Philipp Benecke 7b204ca36b
Use snapshot assertion for nexia diagnostics test (#100328) 2023-09-13 15:00:29 -05:00
J. Nick Koston 877eedf6d7
Use cached_property in entity_registry (#100302) 2023-09-13 14:38:40 -05:00
Quentame 8625bf7894
Add some tests to Freebox (#99755) 2023-09-13 20:22:47 +02:00
Robert Svensson 7b00265cfe
Remove legacy UniFi PoE client clean up (#100318) 2023-09-13 20:14:03 +02:00
Jan Rieger 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 Lekkerkerker f6b094dfee
Add options flow to Withings (#100300) 2023-09-13 18:08:15 +02:00
Erik Montnemery 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 Lekkerkerker 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
starkillerOG 80aa19263b
Netgear catch no info error (#100212) 2023-09-13 15:32:03 +02:00
Franck Nijhof afa0152261
Update syrupy to 4.5.0 (#100283) 2023-09-13 14:40:01 +02:00
Joost Lekkerkerker 38e013a90e
Remove NZBGet configurable scan interval (#98869) 2023-09-13 14:15:40 +02:00
Olen 7fe78fe9e4
Add diagnostics to Twinkly (#100146) 2023-09-13 13:09:57 +02:00
Joost Lekkerkerker 29d8be510e
Test speedtest.net config entry lifecycle (#100280) 2023-09-13 12:40:26 +02:00
TJ Horner dd95b51d10
Address weatherkit late review comments (#100265)
* Address review comments from original weatherkit PR

* Use .get() for optional fields
2023-09-13 09:22:58 +02:00
John Hollowell e87603aa59
Correct Venstar firmware version to use device's FW version instead of API version (#98493) 2023-09-13 08:35:59 +02:00
Luke Lashley 09f58ec396
Bump python-roborock to 0.34.0 (#100236) 2023-09-13 08:33:48 +02:00
Simone Chemelli fe85b20502
SamsungTV: Add unique_id for when missing (legacy models) (#96829)
* Add unique_id for when missing (legacy models)

* add comment

* update tests, thx @epenet
2023-09-13 01:24:49 +02:00
Joost Lekkerkerker 458a3f0df2
Remove restore functionality in Speedtest.net (#96950) 2023-09-12 21:12:01 +02:00
Erik Montnemery bbcbb2e322
Improve Entity._suggest_report_issue (#100204) 2023-09-12 21:07:32 +02:00
Erik Montnemery 51576b7214
Improve typing of entity.entity_sources (#99407)
* Improve typing of entity.entity_sources

* Calculate entity info source when generating WS response

* Adjust typing

* Update tests
2023-09-12 20:41:26 +02:00
mkmer 693a271e40
Clean up device registry for climate devices that no longer exist in Honeywell (#100072) 2023-09-12 20:29:47 +02:00
Joost Lekkerkerker 9672cdf3a9
Add entity translations to WLED (#99056) 2023-09-12 20:19:45 +02:00
uvjustin 5021c69886
Update Stream logging on EVENT_LOGGING_CHANGED (#99256) 2023-09-12 19:38:11 +02:00
Jan Bouwhuis e84a4661b0
Add intial property to imap_content event data (#100171)
* Add initial property to imap event data

* Simplify loop

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

* MyPy

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-09-12 18:54:32 +02:00
Erik Montnemery 6485320bc4
Improve type annotations in websocket_api tests (#100198) 2023-09-12 17:31:25 +02:00
Erik Montnemery 6e6680dc4d
Enable asyncio debug mode in tests (#100197) 2023-09-12 10:12:22 -05:00
jan iversen c178388956
Remove modbus pragma no cover and solve nan (#99221)
* Remove pragma no cover.

* Ruff !

* Review comments.

* update test.

* Review.

* review.

* Add slave test.
2023-09-12 16:05:59 +02:00
jan iversen 9acca1bf58
Make modbus retry fast on read errors (#99576)
* Fast retry on read errors.

* Review comments.
2023-09-12 10:01:15 -04:00
Ståle Storø Hauknes 198532d51d
Airthings BLE unique id migration (#99832)
* Fix sensor unique id

* Add sensor identifiers

* Migrate entities to new unique id

* Fix linting issues

* Fix crash when migrating entity fails

* Change how entities are migrated

* Remve debug logging

* Remove unneeded async

* Remove migration code from init file

* Add migration code to sensor.py

* Adjust for loops to improve speed

* Bugfixes, improve documentation

* Remove old comment

* Remove unused function parameter

* Address PR feedback

* Add tests

* Improve tests and test data

* Refactor test

* Update logger level

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

* Adjust PR comments

* Address more PR comments

* Address PR comments and adjust tests

* Fix PR comment

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-12 09:59:54 -04:00
Mike Degatano 2b62285eee
Fix addon slug validation (#100070)
* Fix addon slug validation

* Don't redefine compile
2023-09-12 09:59:12 -04:00
Joakim Sørensen 1e2b0b65af
Bump hass-nabucasa from 0.70.0 to 0.71.0 (#100193)
Bump hass-nabucasa from 0.70.0 to 0.71.1
2023-09-12 09:58:25 -04:00
Erik Montnemery fabb098ec3
Simplify WS command entity/source (#99439) 2023-09-12 15:39:11 +02:00
Jan Bouwhuis 6b265120b3
Fix entity name attribute on mqtt entity is not removed on update (#100187)
Fix entity name attribute is not remove on update
2023-09-12 15:22:37 +02:00
jan iversen 71207e112e
Bring modbus naming in sync with standard (#99285) 2023-09-12 10:59:50 +02:00
Erik Montnemery 5bcb4f07a0
Bump hatasmota to 0.7.3 (#100169) 2023-09-12 09:58:05 +02:00
Álvaro Fernández Rojas da13afbd3c
Add missing AEMET wind gust speed (#100157) 2023-09-12 09:08:06 +02:00
Allen Porter 183b77973f
Add configuration flow to Todoist integration (#100094)
* Add config flow to todoist

* Fix service calls for todoist

* Fix configuration entry test setup

* Bump test coverage to 100%

* Apply pr feedback
2023-09-11 22:56:08 -07:00
Jan-Philipp Benecke 5d46e22591
Move airly coordinator to its own file (#99545) 2023-09-11 21:52:02 -05:00
J. Nick Koston a20d1a357f
Avoid probing ipp printers for unique_id when it is available via mdns (#99982)
* Avoid probing ipp printers for unique_id when it is available via mdns

We would always probe the device in the ipp flow and than
abort if it was already configured. We avoid the probe for
most printers.

* dry

* coverage

* fix test

* add test for updating host
2023-09-11 22:34:23 -04:00
Michael 3d28c6d636
Fix AVM Fritz!Tools update entity (#100151)
* move update entity to coordinator

* fix tests
2023-09-11 22:30:50 -04:00
Raman Gupta e231da42e1
Handle disconnects in zwave_js repair flow (#99964)
* Handle disconnects in zwave_js repair flow

* Combine logic to reduce LoC

* only check once
2023-09-12 04:21:44 +02:00
Jan-Philipp Benecke 4779cdf2ae
Let the discovergy config flow test end with create entry (#100153) 2023-09-11 23:06:06 +02:00
Joost Lekkerkerker c347c78b6d
Split Withings common file out to their own file (#100150)
* Split common out in logical pieces

* Split common out in logical pieces

* Split common out in logical pieces
2023-09-11 22:25:08 +02:00
Jan-Philipp Benecke 5a56adb3f5
Refactor discovergy config flow test to use parametrize (#100115)
* Refactor discovergy config flow test to use parametrize

* Formatting

* Implement code review sugesstions
2023-09-11 21:53:07 +02:00
puddly cbb28b6943
Migrate internal ZHA data to a dataclasses (#100127)
* Cache device triggers on startup

* reorg zha init

* don't reuse gateway

* don't nuke yaml configuration

* review comments

* Add unit tests

* Do not cache device and entity registries

* [WIP] Wrap ZHA data in a dataclass

* [WIP] Get unit tests passing

* Use a helper function for getting the gateway object to fix annotations

* Remove `bridge_id`

* Fix typing issues with entity references in group websocket info

* Use `Platform` instead of `str` for entity platform matching

* Use `get_zha_gateway` in a few more places

* Fix flaky unit test

* Use `slots` for ZHA data

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

---------

Co-authored-by: David F. Mulcahey <david.mulcahey@icloud.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-11 21:39:33 +02:00
Joost Lekkerkerker 5c206de906
Decouple Withings webhook tests from YAML (#100143) 2023-09-11 14:06:20 -05:00
TJ Horner 17db20fdd7
Add Apple WeatherKit integration (#99895) 2023-09-11 12:06:55 -05:00
Erik Montnemery 18e08bc79f
Bump hatasmota to 0.7.2 (#100129) 2023-09-11 11:35:48 -05:00
Álvaro Fernández Rojas 9c65e59cc8
Remove AEMET daily precipitation sensor test (#100118) 2023-09-11 09:46:59 -05:00
Robert Svensson d8445a79fc
UniFi streamline loading platforms (#100071)
* Streamline loading platforms

* Move platform registration logic to UnifiController class
2023-09-11 15:55:27 +02:00
puddly a6f325d05a
Cache device trigger info during ZHA startup (#99764)
* Do not connect to the radio hardware within `_connect_zigpy_app`

* Make `connect_zigpy_app` public

* Create radio manager instances from config entries

* Cache device triggers on startup

* reorg zha init

* don't reuse gateway

* don't nuke yaml configuration

* review comments

* Fix existing unit tests

* Ensure `app.shutdown` is called, not just `app.disconnect`

* Revert creating group entities and device registry entries early

* Add unit tests

---------

Co-authored-by: David F. Mulcahey <david.mulcahey@icloud.com>
2023-09-11 14:36:01 +02:00
Erik Montnemery 42046a3ce2
Fix TriggerEntity.async_added_to_hass (#100119) 2023-09-11 14:33:43 +02:00
Joost Lekkerkerker a6e9bf830c
Decouple Withings binary sensor test from YAML (#100120) 2023-09-11 13:58:47 +02:00
Joost Lekkerkerker 5781e5e03e
Use json to store Withings test data fixtures (#99998)
* Decouple Withings sensor tests from yaml

* Improve Withings config flow tests

* Improve Withings config flow tests

* Fix feedback

* Use fixtures to store Withings testdata structures

* Use fixtures to store Withings testdata structures

* Use JSON

* Fix

* Use load_json_object_fixture
2023-09-11 12:36:37 +02:00
Jan-Philipp Benecke a4cb06d09f
Also handle DiscovergyClientError as UpdateFailed (#100038)
* Also handle DiscovergyClientError as UpdateFailed

* Change AccessTokenExpired to InvalidLogin

* Also add DiscovergyClientError to config flow and tests
2023-09-11 11:00:50 +02:00
Rami Mosleh eb0099dee8
Move smtp constants to const.py (#99542) 2023-09-11 09:36:55 +02:00
Michael Arthur 8beace265b
Add unit tests for sensors Electric Kiwi (#97723)
* add unit tests for sensors

* newline long strings

* unit test check and move time

* rename entry to entity

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

* add types to test

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

* fix newlined f strings

* remove if statement

* add some more explaination

* Update datetime

Co-authored-by: Robert Resch <robert@resch.dev>

* Simpler time update

Co-authored-by: Robert Resch <robert@resch.dev>

* add missing datetime import

* Update docustring - grammar

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

* address comments and issues raised

* address docstrings too long

* Fix docstring

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-09-11 01:30:25 +02:00
G Johansson 73a695d857
Fix incorrect docstring in TV Camera sensor test (#100083) 2023-09-11 01:22:33 +02:00
G Johansson 954293f77e
Add binary sensors to Trafikverket Camera (#100082) 2023-09-11 01:12:19 +02:00
G Johansson 4ebb6bb823
Add sensors to Trafikverket Camera (#100078)
* Add sensors to Trafikverket Camera

* Remove active

* Fix test len
2023-09-11 00:56:12 +02:00
Álvaro Fernández Rojas 3238386f48
Add water heater support to Airzone (#98401)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-10 12:31:11 -05:00
Tony 3b25262d6c
Address ruckus_unleashed late review (#99411) 2023-09-10 18:49:17 +02:00
Joost Lekkerkerker b165c28a7c
Improve Withings config flow tests (#99697)
* Decouple Withings sensor tests from yaml

* Improve Withings config flow tests

* Improve Withings config flow tests

* Fix feedback

* Rename CONF_PROFILE to PROFILE
2023-09-10 16:18:45 +02:00
Yuxiang Zhu 739eb28b90
Make homekit RTP/RTCP source ports more deterministic (#99989) 2023-09-10 09:07:35 -05:00
mkmer 59e87c0864
Raise HomeAssistantError/ValueError for service calls in Honeywell (#100041) 2023-09-10 15:58:59 +02:00
mkmer d56ad14673
Add diagnostic platform to Honeywell (#100046)
Add diagnostic platform
2023-09-10 15:49:56 +02:00
Diogo Gomes 553cdfbf99
Always update unit of measurement of the utility_meter on state change (#99102) 2023-09-10 08:29:38 -05:00
Bouwe Westerdijk c01a9987b5
Add Plugwise temperature_offset number (#100029)
Add temperature_offset number
2023-09-10 11:34:09 +02:00
J. Nick Koston 3b588a839c
Bump zeroconf to 0.103.0 (#100012) 2023-09-09 19:49:26 -05:00
Luke Lashley 602e36aa12
Add new sensors to Roborock (#99983)
* Add 3 new sensor types

* add state options for dock error

* add unit of measurement
2023-09-10 00:40:28 +02:00
Kevin Worrel 092580a3ed
Bump screenlogicpy to v0.9.0 (#92475)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-09 17:39:54 -05:00
Joost Lekkerkerker 4bc079b219
Use snapshot assertion in Plugwise diagnostic test (#100008)
* Use snapshot assertion in Plugwise diagnostic test

* Use snapshot assertion in Plugwise diagnostic test
2023-09-10 00:38:17 +02:00
Bouwe Westerdijk 081d0bdce5
Bump plugwise to v0.32.2 (#99973)
* Bump plugwise to v0.32.2

* Adapt number.py to the backend updates

* Update related test-cases

* Update plugwise test-fixtures

* Update test_diagnostics.py
2023-09-09 23:50:26 +02:00
Joost Lekkerkerker a62ffeaa99
Decouple Withings sensor tests from yaml (#99691)
* Decouple Withings sensor tests from yaml

* Fix feedback

* Add pytest fixture

* Update tests/components/withings/test_sensor.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update snapshots

* Update snapshots

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-09-09 19:11:28 +02:00
Luke Lashley 71726130c3
Add binary sensors to Roborock (#99990)
* init binary sensors commit

* add binary sensors

* fix test

* Apply suggestions from code review

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

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-09-09 18:12:14 +02:00
Joost Lekkerkerker 9be16d9d42
Add config flow to WAQI (#98220)
* Migrate WAQI to aiowaqi library

* Migrate WAQI to aiowaqi library

* Migrate WAQI to aiowaqi library

* Add config flow to WAQI

* Finish config flow

* Add tests

* Add tests

* Fix ruff

* Add issues on failing to import

* Add issues on failing to import

* Add issues on failing to import

* Add importing issue

* Finish coverage

* Remove url from translation string

* Fix feedback

* Fix feedback
2023-09-09 17:49:54 +02:00
J. Nick Koston bb2cdbe7bc
Change SSDP discovery scan interval to 10 minutes (#99975)
* Change SSDP discovery scan interval to 10 minutes

The first version used a scan interval of 1 minute which we
increased to 2 minutes because it generated too much traffic.

We kept it at 2 minutes because Sonos historicly needed to
get SSDP discovery to stay alive. This is no longer the case
as Sonos has multiple ways to keep from going unavailable:

- mDNS support was added
- We now listen for SSDP alive and good bye all the time
- Each incoming packet from the device keeps it alive now
- We probe when we think the device might be offline

This means it should no longer be necessary to have such a
frequent scan which is a drag on all devices on the network
since its multicast

* adjust tests
2023-09-09 10:54:40 -04:00
G Johansson e425662494
Bump pytrafikverket to 0.3.6 (#99869)
* Bump pytrafikverket to 0.3.6

* Fix config flow names

* str
2023-09-09 16:18:47 +02:00
Thomas Roager 74a7bccd65
Add zdb5100 light to zwave_js (#97586)
* added zdb5100 light

* added light to zdb5100

* Update tests/components/zwave_js/conftest.py

agree

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

* Update tests/components/zwave_js/conftest.py

agree

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

* Rename logic_group_zdb5100_light_state.json to logic_group_zdb5100_state.json

name change

* Update tests/components/zwave_js/test_light.py

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

* Update test_light.py

updated test and state

* Update test_light.py

incorrect endpoint

* changed the state

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-09-09 16:01:32 +02:00
Robert Svensson cf47a6c515
Add UniFi device uptime and temperature sensors (#99307)
* Add UniFi device uptime and temperature sensors

* Add native_unit_of_measurement to temperature
Remove seconds and milliseconds from device uptime
2023-09-09 11:12:44 +02:00
elmurato d59aa958b6
Add tests for Minecraft Server entry migration from v1 to v2 (#99954) 2023-09-08 23:03:27 +02:00
Erik Montnemery 1654ef7759
Make WS command render_template not give up if initial render raises (#99808) 2023-09-08 21:02:06 +02:00
Erik Montnemery b317e04cf1
Bump hatasmota to 0.7.1 (#99818) 2023-09-08 21:01:34 +02:00
Michael Hansen e69c88a0d2
Use aliases when listing pipeline languages (#99672) 2023-09-08 08:22:08 -04:00
Ali Yousuf 47a75cc064
Add more options to Islamic Prayer Times (#95156) 2023-09-08 13:07:33 +02:00
Sam Crang b2b57c5f87
Allow exporting of `update` domain to Prometheus (#99400) 2023-09-07 20:43:47 -07:00
lymanepp b76ba002e2
Fix missing dew point and humidity in tomorrowio forecasts (#99793)
* Fix missing dew point and humidity in tomorrowio forecasts

* Add assertion for correct parameters to realtime_and_all_forecasts method
2023-09-07 22:12:18 -04:00
Simone Chemelli a82cd48282
Bump aiovodafone to 0.1.0 (#99851)
* bump aiovodafone to 0.1.0

* fix tests
2023-09-08 00:32:15 +02:00
mkmer 4ce9c1f304
Add Diagnostic platform to Aladdin Connect (#99682)
* Add diagnostics platform

* Add diagnostic platform

* Add raw data to diagnostics

* Remove config data
bump aioaladdinconnect, use new doors property for diag

* remove unnecessary component config
refactor diag output
2023-09-07 21:27:41 +02:00
jan iversen 77180a73b7
Modbus scale parameter cuts decimals (#99758) 2023-09-07 20:56:00 +02:00
Quentame c3e14d0514
Fix Freebox Home battery sensor (#99756) 2023-09-07 17:28:50 +02:00
Erik Montnemery 368acaf6fd
Improve error handling in /api/states POST (#99810) 2023-09-07 13:33:38 +02:00
elmurato 7c3605c82e
Use config entry ID as unique ID and remove dependency to getmac in Minecraft Server (#97837)
* Use config entry ID as unique ID

* Add entry migration to v2 and and remove helper module

* Remove unneeded strings

* Add asserts for config, device and entity entries and improve comments

* Add debug log for config entry migration

* Reset config entry unique ID and use config entry ID instead

* Remove unnecessary unique ID debug log

* Revert usage of constants for tranlation keys and use dash as delimiter for entity unique id suffix

* Revert "Revert usage of constants for tranlation keys and use dash as delimiter for entity unique id suffix"

This reverts commit 07de334606054097e914404da04950e952bef6d2.

* Remove unused logger in entity module
2023-09-07 12:22:46 +02:00
Erik Montnemery e5210c5823
Always set severity level flag on render_template error events (#99804) 2023-09-07 12:00:19 +02:00
Quentame 1a22ab77e1
Fix Freebox disk free space sensor (#99757)
* Fix Freebox disk free space sensor

* Add initial value assert to check results
2023-09-07 10:28:08 +02:00
Maciej Bieniek e1f4a3fa9f
Add energy meter sensors for Shelly Pro EM (#99747)
* Add support for Pro EM

* Improve get_rpc_channel_name()

* Revert an unintended change

* Add tests
2023-09-07 06:59:04 +02:00
Jan Bouwhuis 7c7456df99
Handle alexa invalid climate temp adjustment (#99740)
* Handle temp adjust when target state not set

* Update homeassistant/components/alexa/errors.py

Co-authored-by: Robert Resch <robert@resch.dev>

* black

---------

Co-authored-by: Robert Resch <robert@resch.dev>
2023-09-06 18:54:16 +02:00
mkmer 54d92b649b
Raise error on open/close failure in Aladdin Connect (#99746)
Raise error on open/close failure
2023-09-06 18:33:58 +02:00
Erik Montnemery c9a6ea94a7
Send template render errors to template helper preview (#99716) 2023-09-06 16:07:05 +02:00
David Knowles bb765449eb
Add binary_sensor to Schlage (#99637)
* Add binary_sensor to Schlage

* Apply suggestions from code review

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

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-09-06 15:03:54 +02:00
Jan Bouwhuis b815ea1332
Revert "Remove imap_email_content integration" (#99713) 2023-09-06 11:54:18 +02:00
Marc Mueller 274507b5c9
Fix pylint plugin test DeprecationWarning (#99711) 2023-09-06 11:35:57 +02:00
J. Nick Koston 034fabe188
Use loop time to set context (#99701)
* Use loop time to set context

loop time is faster than utcnow, and since its only used internally it can
be switched without a breaking change

* fix mocking
2023-09-06 11:04:49 +02:00
Erik Montnemery 48f7924e9e
Allow specifying a custom log function for template render (#99572)
* Allow specifying a custom log function for template render

* Bypass template cache when reporting errors + fix tests

* Send errors as events

* Fix logic for creating new TemplateEnvironment

* Add strict mode back

* Only send error events if report_errors is True

* Force test of websocket_api only

* Debug test

* Run pytest with higher verbosity

* Timeout after 1 minute, enable syslog output

* Adjust timeout

* Add debug logs

* Fix unsafe call to WebSocketHandler._send_message

* Remove debug code

* Improve test coverage

* Revert accidental change

* Include severity in error events

* Remove redundant information from error events
2023-09-06 10:03:35 +02:00
Erik Montnemery cdca4591a4
Include template listener info in template preview (#99669) 2023-09-06 09:49:42 +02:00