Commit Graph

75496 Commits (3875533f9576ad3b1298254cb3575c7bd7ed26a7)

Author SHA1 Message Date
Franck Nijhof 9a1906322b
Allow numeric state trigger/condition against zone entities (#114221) 2024-03-26 19:41:46 +01:00
Ron Weikamp e1036b3af0
Refactor Riemann sum integral sensor to prepare for time based trigger (#113932)
* Refactor Integration sensor.

* Use local simple function to verify the State is numeric.

* Merge two methods to one.

* Method renaming: _handle_state_change

* Move async_write_ha_state to the caller.

* Add comment on why attr_icon is set to None

* Remove possible None type of State in validation methods.

* Use a dict to map method name to method class.

* Explain derived unit after integration.

* Renaming to _multiply_unit_with_time and elaborate in docstring.

* Set integral unit_of_measurement explicitly to None if source unit_of_measurement is None

* One function for unit of measurement related steps.

* Improve docstring of _multiply_unit_with_time

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Apply f-string suggestions from code review

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Be more clear in comment about removing the sensors icon default.

* Apply suggestions from code review

Co-authored-by: Diogo Gomes <diogogomes@gmail.com>

* Update homeassistant/components/integration/sensor.py

* Update homeassistant/components/integration/sensor.py

* Update homeassistant/components/integration/sensor.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Diogo Gomes <diogogomes@gmail.com>
2024-03-26 19:09:48 +01:00
Franck Nijhof c247534731
Default floor level to None (and allow unsetting it) (#114249) 2024-03-26 18:58:25 +01:00
Marc Mueller c8260a5966
Remove test cases for task eager_start <3.12 (#114243) 2024-03-26 15:52:38 +01:00
Lenn 53944b260c
Bump motionblindsble to 0.0.9 (#114232) 2024-03-26 08:17:29 -04:00
Franck Nijhof 2388e2dda9
Drop Python 3.11 support (#114220) 2024-03-26 12:51:14 +01:00
Marc Mueller 31f5576b6e
Add ruff commit to git-blame-ignore-revs (#114229) 2024-03-26 12:16:55 +01:00
Marc Mueller eb81a4204e
Allow string formatting for dispatcher SignalType (#114174) 2024-03-26 10:38:29 +01:00
Erik Montnemery dd43947ca0
Add test to ensure non callback event filter is rejected (#114182) 2024-03-26 10:36:08 +01:00
Erik Montnemery bac527f289
Don't allow listening to state_reported in event triggers (#114191)
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2024-03-26 10:35:47 +01:00
Duco Sebel 788813aad6
Implement Identify button and Cloud connection toggle for HomeWizard Watermeter (#113814) 2024-03-26 10:34:36 +01:00
Franck Nijhof 5c69e0d2c6
Add label template functions (#111024) 2024-03-26 10:32:29 +01:00
Cyrill Raccaud e136847b89
Add more timestamp sensors to swiss_public_transport (#107916)
* add more timestamp sensors

* more generic definition for future sensors

* add entity descriptor

* use enable property to prevent sensors from getting added

* set legacy attribute flag for first sensor

* remove departure from extra attributes

* remove breaking changes again and keep for next pr

* fix multiline statements

* outsource the multiline ifs into function

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-26 10:17:25 +01:00
Robert Resch 0338aaf577
Allow pre-releases for "Adjust nightly version" only (#114219) 2024-03-26 10:05:13 +01:00
Joost Lekkerkerker ddee999843
Fix motion blinds formatting (#114222) 2024-03-26 09:57:19 +01:00
Lenn 70c4fa8475
Add Motionblinds BLE integration (#109497)
* initial fork

* intial tests

* Initial test coverage

* extra coverage

* complete config flow tests

* fix generated

* Update CODEOWNERS

* Move logic to PyPi library and update to pass config_flow test and pre-commit

* Remove Button, Select and Sensor platform for initial PR

* Update manifest.json

* Change info logs to debug in cover

* Use _abort_if_unique_id_configured instead of custom loop checking existing entries

* Change platforms list to PLATFORMS global

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Remove VERSION from ConfigFlow

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Replace all info logs by debug

* Use instance attributes in ConfigFlow

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Add return type and docstring to init in ConfigFlow

* Add recovery to tests containing errors

* Make NoBluetoothAdapter and NoDevicesFound abort instead of show error

* Change info logs to debug

* Add and change integration type from hub to device

* Use CONF_ADDRESS from homeassistant.const

* Move cover attributes initialization out of constructor

* Change CONF_ADDRESS in tests from const to homeassistant.const

* Remove unused part of tests

* Change 'not motion_device' to 'motion_device is None'

* Change _attr_connection_type to _connection_type

* Add connections to DeviceInfo

* Add model to DeviceInfo and change MotionBlindType values

* Remove identifiers from DeviceInfo

* Move constants from const to library

* Move calibration and running to library, re-add all platforms

* Remove platforms from init

* Remove button platform

* Remove select platform

* Remove sensor platform

* Bump motionblindsble to 0.0.4

* Remove closed, opening and closing attribute default values

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Remove CONFIG_SCHEMA from init

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Remove unused platform attributes and icons

* Re-add _attr_is_closed to GenericBlind to fix error

* Use entry.async_create_background_task for library instead of entry.async_create_task

* Move updating of position on disconnect to library

* Remove type hints, keep for _attr_is_closed

* Use DISPLAY_NAME constant from library for display name

* Add TYPE_CHECKING condition to assert in config_flow

* Re-add CONFIG_SCHEMA to __init__ to pass hassfest

* Change FlowResult type to ConfigFlowResult

* Fix import in tests

* Fix ruff import

* Fix tests by using value of enum

* Use lowercase name of MotionBlindType enum for data schema selector and translation

* Fix using name instead of value for MotionBlindType

* Improve position None handling

Co-authored-by: starkillerOG <starkiller.og@gmail.com>

* Improve tilt None handling

Co-authored-by: starkillerOG <starkiller.og@gmail.com>

* Change BLIND_TO_ENTITY_TYPE name

* Set entity name of cover to None and use DeviceInfo name

* Add base entity

* Move async_update to base entity

* Move unique ID with suffix to base class

* Add entity.py to .coveragerc

* Remove extra state attribute connection type

* Remove separate line hass.data.setdefault(DOMAIN, {})

* Remove use of field for key and translation_key in MotionCoverEntityDescription

* Remove entity translation with extra state_attributes from strings.json

* Use super().__init__(device, entry)

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

* Change if block in async_update_running

* Use if blocks in async_update_position

* Add additional scanner check before show_form

* Remove default value of device_class in MotionCoverEntityDescription

* Fix entry.data[CONF_BLIND_TYPE] uppercase

* Fix device info model name

* Bump motionblindsble to 0.0.5

* Fix tests

* Move entity_description to MotionblindsBLEEntity

* Change double roller blind name

* Bump motionblindsble to 0.0.6

* Fix ruff

* Use status_query for async_update

* Bump motionblindsble to 0.0.7

* Change bluetooth local name

* Set kw_only=True for dataclass

* Change name of GenericBlind

* Change scanner_count conditional

* Wrap async_register_callback in entry.async_on_unload

* Bump motionblindsble to 0.0.8

* Use set_create_task_factory and set_call_later_factory

* Update bluetooth.py generated

* Simplify COVER_TYPES dictionary

* Move registering callbacks to async_added_to_hass

* Remove check for ATTR_POSITION and ATTR_TILT_POSITION in kwargs

* Add naming consistency for device and entry

* Use if block instead of ternary for _attr_unique_id

* Improve errors ternary in config_flow

* Use set instead of list for running_type

* Improve errors ternary in config_flow

* Remove init from MotionblindsBLECoverEntity and move debug log to async_added_to_hass

* Update debug log create cover

* Fix ruff

* Use identity check instead of equals

* Use identity check instead of equals

* Change MotionblindsBLECoverEntityDescription name

* Change debug log text

* Remove ATTR_CONNECTION from const

* Add types for variables in async_setup_entry

* Add types for variables in async_setup_entry

* Change PositionBlind class name to PositionCover etc

* Improve docstrings

* Improve docstrings

---------

Co-authored-by: starkillerOG <starkiller.og@gmail.com>
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-26 09:52:04 +01:00
Arie Catsman b9fdd56f01
Bump pyenphase to 1.20.1 (#114218) 2024-03-25 22:42:19 -10:00
Matrix 63b4fd09c1
Add YoLink Water Meter Support (#114148)
* Add YS-5006/5007/5008 Water Meter Support

* Add YoLink Water Meter Support

* Update .coveragerc

* fix as suggestion
2024-03-26 09:29:14 +01:00
J. Nick Koston 54a69a2687
Remove async_get_device_class_lookup from entity_registry (#114212)
This function was only ever used in homekit, and since there is
now an index of devices in the entity registry, homekit no longer
uses it.

I searched github code for all references to async_get_device_class_lookup
and the only think I could find using it were forks of core. It seems
unlikely that any custom components are affected by removing this
function
2024-03-26 09:22:53 +01:00
Robert Svensson 3f545cb3d3
Rework Axis entity loader to have a better internal storage structure (#114114)
* Make one single subscribe containing all topics at once

* Update homeassistant/components/axis/hub/entity_loader.py

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

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 07:55:07 +01:00
Marc Mueller d0ecad78ac
Revert "Update typing-extensions to 4.11.0rc1 (#114116)" (#114216) 2024-03-25 20:44:57 -10:00
J. Nick Koston cabc4f797a
Preload storage for integrations we know we are going to setup (#114192) 2024-03-25 15:49:54 -10:00
J. Nick Koston 345fa75562
Bump SQLAlchemy to 2.0.29 (#114208) 2024-03-25 14:39:16 -10:00
Jan-Philipp Benecke 9580adfde9
Use new `setup_test_component_platform` helper instead of test fixture for light platform (#114200) 2024-03-26 00:17:16 +01:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
J. Nick Koston 27219b6962
Bump anyio to 4.3.0 (#114198) 2024-03-25 23:52:28 +01:00
Jan-Philipp Benecke 2f0cfc8b61
Remove deprecated `hass.components` from system_health tests (#114207) 2024-03-26 00:39:31 +02:00
Jan Bouwhuis 18174ad47d
Improve test coverage mqtt discovery test (#114188) 2024-03-25 22:41:11 +01:00
Shay Levy 121182167f
Fix Shelly reauth flow (#114180)
* Fix Shelly reauth flow

* Rename shutdown_device to async_shutdown_device
2024-03-25 23:27:44 +02:00
Jan-Philipp Benecke 9b682388f5
Add generic test component platform setup function (#114016)
* Add generic entity platform setup fixture

* rename fixture

* No need for passing hass

* Make function instead of fixture

* Improve typing

* Use Sequence instead

* Migrate flux to use the new helper

* Use list instead

* Use Sequence instead
2024-03-25 21:36:17 +01:00
Jim 6ceeb1e41f
Telegram bot proxy params deprecation (#112778)
* Add strings for issues to raise in telegram integration startup

* Allow proxy_params to be passed empty

Allows migration away from proxy_params whilst retaining a configured proxy.

* Raise issues for removing proxy_params config option

* Add types to initialize_bot function

* Add PR link for learn more URL

Update issue message to leave a comment on the PR instead

* Apply suggestions from code review

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

* hass should always be first argument

* Update issues strings to give domain and better direction.

* Update breaks_in_ha_version to something saner

* Apply strings.json suggestions from code review

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-03-25 21:09:34 +01:00
Erik Montnemery e2ee623d23
Add restrictions for listening to event_reported events (#114183)
* Add restrictions for listening to event_reported events

* Update homeassistant/core.py

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-03-25 19:16:50 +01:00
J. Nick Koston c3f4aca4e3
Add reauth support to NUT (#114131) 2024-03-25 07:59:46 -10:00
Robert Resch 135c40cad8
Add Ecovacs last job event entity (#113826)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-25 18:31:04 +01:00
G Johansson 5e70faca5f
Refactor options flow in dnsip (#114058)
* Refactor options flow in dnsip

* Mods
2024-03-25 17:38:02 +01:00
Robert Svensson 71a6653f60
Fix Axis not generate unique IDs (#114115) 2024-03-25 12:21:21 -04:00
Robert Svensson c1e1db9863
Adapt to Axis library file structure changes (#114181)
* Adapt to axis library file structure changes

* Bump axis to v59
2024-03-25 12:16:41 -04:00
Thomas55555 b71cbeff51
Bump aioautomower to 2024.3.4 (#114127)
* Bump aioautomower to 2024.3.4

* Update homeassistant/components/husqvarna_automower/sensor.py

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

* adjust imports

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-25 16:11:12 +01:00
Kevin Stillhammer 3d6600364b
Bump pywaze to 1.0.0 (#108613) 2024-03-25 16:08:57 +01:00
Max von Webel 7b2166243b
Updated temp offset logging in tado component (#106308)
* Updated temp offset logging in tado component

The logging is a bit confusing because it's trimming the digits from the value. Hopefully this makes it a bit more clear.

* Update homeassistant/components/tado/climate.py

Co-authored-by: Jorim Tielemans <tielemans.jorim@gmail.com>

---------

Co-authored-by: Jorim Tielemans <tielemans.jorim@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-03-25 15:10:16 +01:00
Manuel Dipolt e2a26f6470
Add base entity to romy integration (#113750)
* cherry picked base entity changes from the branches romy_binary_sensor & romy_sensor

* Update homeassistant/components/romy/entity.py

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Update homeassistant/components/romy/vacuum.py

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Update homeassistant/components/romy/entity.py

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Update homeassistant/components/romy/vacuum.py

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Update homeassistant/components/romy/vacuum.py

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* code review changes, base entity/coordinator cleanup

---------

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
2024-03-25 14:28:07 +01:00
Joost Lekkerkerker d398eb1f2c
Add Withings webhook manager (#106311) 2024-03-25 13:59:36 +01:00
J. Nick Koston 3acb505456
Refactor homekit device linking to use the device index (#114145)
Now that we have an index of devices in the entity registry
we can avoid generating a lookup for devices we do
not care about
2024-03-25 08:28:56 -04:00
Matthias Lohr 95ddade83c
Use enums to define choices in tolo (#113992)
* use enums defined in HA to define choices

* move enums to .const
2024-03-25 12:47:56 +01:00
Marc Mueller 49a4fe41c6
Update codespell to 2.2.6 (#114167) 2024-03-25 12:33:25 +01:00
Marc Mueller 56e13ef3fc
Update pytest-unordered to 0.6.0 (#114162) 2024-03-25 11:45:07 +01:00
Marc Mueller 81c34ac952
Fix spelling [docstrings + comments] (#114168) 2024-03-25 11:33:00 +01:00
Marc Mueller 9b7cc088be
Fix spelling [runtime] (#114169) 2024-03-25 11:32:50 +01:00
Marc Mueller 8ae2fefcf3
Update types packages (#114164) 2024-03-25 11:32:38 +01:00
G Johansson 3ba1b82723
Remove hourly weather entity from met_eireann (#112449) 2024-03-25 11:30:50 +01:00