Compare commits

...

888 Commits

Author SHA1 Message Date
Paulus Schoutsen
0e89d0a26b Bumped version to 2023.7.0b2 2023-06-29 22:21:39 -04:00
puddly
03e7170080 Fix ZHA multi-PAN startup issue (#95595)
Bump ZHA dependencies
2023-06-29 22:21:34 -04:00
Paulus Schoutsen
c67f37d1be Wiz set name explicitely to None (#95593) 2023-06-29 22:21:34 -04:00
dougiteixeira
6aba1a5af3 Fix device source for Utility Meter (#95585)
* Fix Device Source

* Remove debug
2023-06-29 22:21:32 -04:00
J. Nick Koston
1cf472f4e3 Bump bluetooth-data-tools to 1.3.0 (#95576) 2023-06-29 22:21:31 -04:00
RenierM26
b8fc6e0c66 Ezviz IR string align with depreciation. (#95563) 2023-06-29 22:21:30 -04:00
Paulus Schoutsen
a04c98a703 Bumped version to 2023.7.0b1 2023-06-29 13:57:56 -04:00
Paulus Schoutsen
4255a2af15 Fix entity name for iBeacon and Roku (#95574)
* Fix entity nmae for iBeacon and Roku

* Roku remote too
2023-06-29 13:57:45 -04:00
Bram Kragten
c47a43c2b9 Update frontend to 20230629.0 (#95570) 2023-06-29 13:57:43 -04:00
Artem Draft
bcca1c91e6 Fix Android TV Remote entity naming (#95568)
Return None as Android TV Remote entity name
2023-06-29 13:57:42 -04:00
Paulus Schoutsen
9cd7034dbd Fix some entity naming (#95562) 2023-06-29 13:57:41 -04:00
Joost Lekkerkerker
ee72a952de Philips.js explicit device naming (#95551) 2023-06-29 13:57:39 -04:00
Luke
22e32bc737 Bump Roborock to 0.29.2 (#95549)
* init work

* fix tests
2023-06-29 13:57:34 -04:00
J. Nick Koston
2a42622de9 Fix manual specification of multiple advertise_ip with HomeKit (#95548)
fixes #95508
2023-06-29 13:57:33 -04:00
Joost Lekkerkerker
8f88b710f0 Use explicit naming in Nest (#95532) 2023-06-29 13:57:30 -04:00
Joost Lekkerkerker
1df12e8771 Use explicit naming in workday sensor (#95531) 2023-06-29 13:57:29 -04:00
Franck Nijhof
129fee09d3 Bump breaking version for YAML features ADR-0021 (#95525) 2023-06-29 13:57:28 -04:00
Franck Nijhof
61ab84bf04 Revert "Remove Workday YAML configuration (#94102)" (#95524) 2023-06-29 13:57:25 -04:00
Franck Nijhof
4f99a71f61 Revert "Remove snapcast YAML configuration (#93547)" (#95523) 2023-06-29 13:57:23 -04:00
Franck Nijhof
f165357772 Revert "Remove qbittorrent YAML configuration (#93548)" (#95522) 2023-06-29 13:57:19 -04:00
Franck Nijhof
c156951925 Revert "Remove Brottsplatskartan YAML configuration (#94101)" (#95521) 2023-06-29 13:57:15 -04:00
Franck Nijhof
612f33e372 Mark text input required for conversation.process service (#95520) 2023-06-29 13:57:14 -04:00
Marcel van der Veldt
2b274b4e95 Bump Matter Server to 3.6.3 (#95519) 2023-06-29 13:57:11 -04:00
Joost Lekkerkerker
2ac5bb46b1 Add explicit device name to Broadlink (#95516) 2023-06-29 13:57:09 -04:00
Joost Lekkerkerker
c4a46294cc Add explicit device name to Roborock (#95513) 2023-06-29 13:55:47 -04:00
Joost Lekkerkerker
cda5ee5814 Add explicit device name to Switchbot (#95512) 2023-06-29 13:55:46 -04:00
Joost Lekkerkerker
698333f894 Add explicit device name to Tuya (#95511)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-06-29 13:55:45 -04:00
Joost Lekkerkerker
b93ceca804 Add explicit device name to Spotify (#95509) 2023-06-29 13:55:44 -04:00
Allen Porter
286cff314a Limit fields returned for the list events service (#95506)
* Limit fields returned for the list events service

* Update websocket tests and fix bugs in response fields

* Omit 'None' fields in the list events response
2023-06-29 13:55:43 -04:00
Raman Gupta
d44ef07082 Fix binary sensor device trigger for lock class (#95505) 2023-06-29 13:55:42 -04:00
Joost Lekkerkerker
8dd2e21d0b Fix YouTube coordinator bug (#95492)
Fix coordinator bug
2023-06-29 13:55:41 -04:00
Matthias Alphart
f55ada5d61 Add reload service to KNX (#95489) 2023-06-29 13:55:39 -04:00
Brandon Rothweiler
1f72a5b1fe Remove incompatible button entities for Mazda electric vehicles (#95486)
* Remove incompatible button entities for Mazda electric vehicles

* Update tests
2023-06-29 13:53:53 -04:00
Evan Jarrett
71b192c072 Update matter locks to support pin code validation (#95481)
Update matter locks to support PINCode validation based on device attributes
2023-06-29 13:52:06 -04:00
Michael Hansen
17c64ed791 Add targeted entities to sentence debug API (#95480)
* Return targets with debug sentence API

* Update test

* Update homeassistant/components/conversation/__init__.py

* Include area/domain in test sentences

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-29 13:52:05 -04:00
puddly
4e940df224 Bump ZHA dependencies (#95478)
* Bump ZHA dependencies

* Account for new EZSP metadata keys
2023-06-29 13:52:04 -04:00
Marcel van der Veldt
a23c0e12f1 Fix Matter entity names (#95477) 2023-06-29 13:51:59 -04:00
Bram Kragten
be22195cf4 Add conversation agent selector, use in conversation.process service (#95462) 2023-06-29 13:44:13 -04:00
Michael Hansen
a39ef03ff5 Disconnect VoIP on RTCP bye message (#95452)
* Support RTCP BYE message

* Make RtcpState optional
2023-06-29 13:44:12 -04:00
Barry Williams
1687ff1f28 Add Update Entity for Linn devices (#95217)
* added update entity for Linn devices

* Update homeassistant/components/openhome/update.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* use parent methods for version attributes

* fixed issue with mocking openhome device

* Update homeassistant/components/openhome/update.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* update entity name in tests

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-06-29 13:44:09 -04:00
Franck Nijhof
28a5e4735f Bumped version to 2023.7.0b0 2023-06-28 20:45:45 +02:00
J. Nick Koston
25dc9f5942 Migrate esphome climate platform to use _on_static_info_update (#95471) 2023-06-28 20:37:35 +02:00
Eric Severance
03dac6e171 Remove polling_interval_seconds option from wemo (#95468) 2023-06-28 20:27:10 +02:00
Emory Penney
804b27cc2f Improve Obihai Connection Stability (#94406)
* Improving Obihai Connectivity

* Update homeassistant/components/obihai/sensor.py

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

* PR feedback

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-06-28 20:12:09 +02:00
Michael
b64be798df Fix qr code data update in AVM Fritz!Tools (#95470)
* use async_update

* improve tests

* use async_image
2023-06-28 19:57:03 +02:00
Michael Hansen
79f1c86789 Bump home-assistant-intents to 2023.6.28 (#95451) 2023-06-28 19:35:18 +02:00
Joost Lekkerkerker
ecfb259438 Add entity translations to iBeacon (#95460)
* Add entity translations to iBeacon

* Add entity translations to iBeacon
2023-06-28 19:32:58 +02:00
Olen
4959fce1e0 Fix setting number of digits for verisure lock PIN (#95449)
* Fix error when setting number of digits

* Update test_config_flow.py

Add test for empty code
2023-06-28 19:18:45 +02:00
Michael Hansen
3d84c6e21c Use "Done" as a default response for sentence triggers (#95463)
* Use "Done" as a default response for sentence triggers

* Move response to trigger callback
2023-06-28 12:34:55 -04:00
Joost Lekkerkerker
d8d580ad58 Make smartthings use the right unit of measurement for illuminance sensors (#95456) 2023-06-28 18:18:24 +02:00
Joost Lekkerkerker
e0d1d16da1 Remove mutable object from hvv sensor (#95454) 2023-06-28 18:18:11 +02:00
Bram Kragten
b2c0ca304b Update frontend to 20230628.0 (#95458) 2023-06-28 18:16:39 +02:00
Martin Hjelmare
de4e3b5ffe Disable sun.sun no platform log (#95450) 2023-06-28 17:06:23 +02:00
Artem Draft
c14a2dd912 Add active_child_template to universal media player (#88816)
* Add active_children_template in universal

* handle multiple updates

* edit docstring

* Rename parameter to active_child_template
2023-06-28 16:36:18 +02:00
Michael
acb7b1fe3b Apply suggestion from late review of #95282 (#95437) 2023-06-28 16:20:23 +02:00
Joost Lekkerkerker
4393aa4f50 Add entity translations to Growatt Server (#95410)
* Add entity translations to Growatt Server

* Fix feedback
2023-06-28 15:28:01 +02:00
Jan Bouwhuis
0a74bffe67 Fix error for stt when async_get_engine is not implemented (#95443)
* Fix error for stt

* Revert "Fix error for stt"

This reverts commit 723cd191fed26b89203a7ec8b78b15f3ae9d9ab9.

* Remove legacy stt platform component
2023-06-28 15:27:06 +02:00
Matthias Alphart
489781c1e6 Add time platform to KNX (#95302) 2023-06-28 15:19:32 +02:00
Erik Montnemery
24ea865553 Fix a couple of typos (#95441) 2023-06-28 14:37:13 +02:00
Jan Bouwhuis
0856121046 Add action topic to MQTT humidifier (#95212)
* Add action topic to MQTT humidifier

* Add tests
2023-06-28 14:21:15 +02:00
Joost Lekkerkerker
e9495c9cc6 Add entity translations for homewizard (#95416)
* Add entity translations for homewizard

* Add entity translations for homewizard

* Add entity translations for homewizard

* Fix tests
2023-06-28 14:02:54 +02:00
avee87
6c2c4c989f Migrate Transmission to new entity naming (#95436) 2023-06-28 14:00:06 +02:00
Joost Lekkerkerker
103375ef95 Add entity translations to HVV Departures (#95442)
* Add entity translations to HVV Departures

* Add entity translations to HVV Departures
2023-06-28 13:57:04 +02:00
Joost Lekkerkerker
ff015310fd Add entity translations to honeywell (#95440) 2023-06-28 13:55:42 +02:00
Sab44
c1953b0ae4 Decouple Hyperion entitites and clear source when light is off (#80478)
* Remove Hyperion Priority Light

* Remove coupling between light entity and led device

* Merge HyperionLight and HyperionBaseLight as we will only have one light entity

* Set state based on whether priority channel is open or not

* Remove leftover variable from Priority Light

* Remove external sources from light entity; use switch entities instead

* Remove external effects from effects to show dropdown

* Remove workaround for hyperion.ng issue 992

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-06-28 13:51:42 +02:00
starkillerOG
ee4459f41e Extend Reolink update entity (#94323)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-06-28 13:32:14 +02:00
Christopher Johnson
c2cd4d0517 Expose host in ubus device tracker (#80621)
* Expose host in ubus device tracker

* Update homeassistant/components/ubus/device_tracker.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-06-28 13:27:47 +02:00
Dominik
796b5ef196 Bump glances-api to 0.4.3 (#95431) 2023-06-28 13:23:15 +02:00
Denis Shulyaka
ae21ab2945 Add action attribute to Humidifier entity (#95131)
* Add HumidifierAction StrEnum

* Add action attribute to HumidifierEntity

* Update strings.json

* Add action to demo humidifier

* Add tests

* Fix imports

* Add 'off' humidifier action

* Set action to 'off' when state is 'off'

* Add 'off' action to strings.json

* Test that action sets to "off" when state is "off"

* Use is_on instead of state

* Fix typo

* black
2023-06-28 13:21:17 +02:00
Jan Bouwhuis
8b6ed9c6b9 Fix test with time issue for xiaomi_miio button (#95438) 2023-06-28 13:19:24 +02:00
Jan Bouwhuis
fe7857c8ec Add current_humidity device_trigger for humidity component (#95435)
Add current_humidity device_trigger for humidity
2023-06-28 13:13:55 +02:00
Maximilian
0bfb81ecf3 Replace NINA corona filter with regex (#83181)
* Change headline filter to regex

* Add config migration

* Update config flow
2023-06-28 13:00:08 +02:00
Maxim Oei
36b0fc17df Update Telegram bot to support URLs in inlineKeyboard (#70445)
* Update Telegram bot to support URLs in inlineKeyboard

Update creation of InlineKeyboardButton to support url case, on top of callbacks

* linting

* Apply suggestions from code review

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-06-28 12:56:00 +02:00
Jan Bouwhuis
8b563120b5 Add comment for assumed trigger_type (#95432)
* Add comment for assumed tigger_type

* Update homeassistant/components/climate/device_trigger.py

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

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-06-28 12:22:56 +02:00
Álvaro Fernández Rojas
d430e089d2 Update aioairzone-cloud to v0.2.0 (#95429) 2023-06-28 11:09:17 +02:00
Paulus Schoutsen
149ac4f99e Capitalize a bunch of translations (#95421) 2023-06-28 11:08:53 +02:00
avee87
a5b91cb7e3 Fix invalid unique id for Transmission entities (#84664)
* Update unique id for Transmission entities

* Moved migration to a separate function

* Hopefully fixed coverage

* Extracted dictionary to constant

* review comments

* more comments

* revert accidental name change

* more review comments

* more review comments

* use lists instead of incorrect tuple syntax
2023-06-28 10:45:13 +02:00
Joost Lekkerkerker
2747da784c Move Fjaraskupan coordinator to separate file (#95342)
* Move coordinator to separate file

* Move coordinator to separate file

* Move coordinator to separate file
2023-06-28 10:41:50 +02:00
Franck Nijhof
98a94fea99 Merge branch 'master' into dev 2023-06-28 10:23:20 +02:00
Luke
f6aae8b01b Remove unneded construct import for Eddystone (#95418) 2023-06-28 10:02:01 +02:00
Jan Bouwhuis
265ccae54f Do not allow zerovalue as total_increasing for homewizard sensors (#90982)
* Do not allow zerovalue  as total_increasing

* Fix for solar exports

* Revert not needed change

* Adjust handling, making tests pass

---------

Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-28 09:53:33 +02:00
cpolhout
cfb133d431 Add new integration Loqed (#70080) 2023-06-28 09:42:12 +02:00
dependabot[bot]
ebd5eb4470 Bump sigstore/cosign-installer from 3.1.0 to 3.1.1 (#95427)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-28 09:41:08 +02:00
aschobba
f5b2273fc1 Add support for HmIP-BS2 to HomematicIP Cloud (#93599)
* Add support for HmIP-BS2

Add support for HmIP-BS2

* Run ruff fix

---------

Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-28 09:33:48 +02:00
hcross13
5955be46a4 Fix ness_alarm tasks being fired before required sensors and panel are loaded asynchronously (#94590)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-06-28 09:30:48 +02:00
Ruben Bokobza
7a82176670 Add preset support to electrasmart climate (#94068) 2023-06-28 09:29:58 +02:00
starkillerOG
d2cd0c9934 Add reolink channel based record, push, email, ftp, and buzzer switches (#91006)
* Add channel based email, ftp, push, rec and buzzer switches

* fix dataclass
2023-06-28 09:18:14 +02:00
Don Holly
04e277ac95 Add AirQuality SensorState support for Google Assistant (#80579)
* Add AirQuality SensorState support for Google Assistant

* Code formatting

* Apply suggestions from code review

Co-authored-by: Joakim Plate <elupus@ecce.se>

* Update trait.py

* Update trait.py

* Fix google_assistant tests

* Update trait.py

* Simplify sensor state payload and tests

* Add more tests to fix coverage

* fix tests

* Truncate once

---------

Co-authored-by: Joakim Plate <elupus@ecce.se>
Co-authored-by: Erik <erik@montnemery.com>
2023-06-28 08:55:00 +02:00
J. Nick Koston
72806bfaf2 Add more test coverage for ESPHome lights (#95415) 2023-06-28 08:40:21 +02:00
Joost Lekkerkerker
b53b162d05 Add entity translations to Flo (#95347)
* Add entity translations to Flo

* Add entity translations to Flo
2023-06-28 08:36:10 +02:00
Michael
4daacf9c4b Add Guest WiFi QR-Code image entity to AVM Fritz!Tools (#95282) 2023-06-27 23:48:28 +02:00
Joost Lekkerkerker
aaa4ee79b8 Add entity translations to HERE Travel time (#95412) 2023-06-27 23:35:12 +02:00
shbatm
4e05205174 Add updated ISY994/IoX Units of Measurement (#95408) 2023-06-27 16:17:36 -05:00
Nathan Spencer
ec8988f8ea Add time entity for sleep mode start time to Litter-Robot 3 (#94194) 2023-06-27 22:25:29 +02:00
Joost Lekkerkerker
21c619e702 Add entity translations to Guardian (#95411) 2023-06-27 22:24:41 +02:00
zry98
bafb81337b Add buttons for resetting vacuum consumable status in xiaomi_miio (#91483)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Eugenio Panadero <eugenio.panadero@gmail.com>
2023-06-27 21:58:29 +02:00
Dave T
7fa86d3998 Simplify parsing of user input during config flow for generic (#86256)
Co-authored-by: Dave T <davet2001@users.noreply.github.com>
2023-06-27 21:29:06 +02:00
Álvaro Fernández Rojas
78380c0cd4 Allow turning Airzone slave zones on with any HVAC mode (#94721)
airzone: climate: allow turning slave zone on with any hvac mode

If the user selects a different mode on a slave zone from the one selected on
the master zone, it will raise an exception and it won't change the operation
mode or turn it on.
Change this behaviour so that the exception will still be raised but the slave
zone will be turned on and the hvac mode won't be changed.
This allows commanding airzone slave zones from limited APIs like homekit.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-06-27 21:25:41 +02:00
Marcel van der Veldt
ed2daf1f65 Change subscription logic for Matter devices (#95387) 2023-06-27 21:12:29 +02:00
Joost Lekkerkerker
a885ceefa2 Add entity translations to Gios (#95403) 2023-06-27 20:58:03 +02:00
Eric Severance
a4a6972237 Set webhook local_only deprecation to 2023.11.0 (#95401) 2023-06-27 20:43:11 +02:00
Charles Garwood
34827571ba Add set_config service to Fully Kiosk Browser integration (#95318)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-27 20:42:18 +02:00
micha91
16fe79db75 Improve the source labels for MusicCast players (#74954) 2023-06-27 20:34:04 +02:00
Joost Lekkerkerker
dd3693caca Add entity translations to Github (#95404) 2023-06-27 20:33:27 +02:00
Ian Foster
286bdff8bc Fix keyboard_remote device_descriptor when using symbolic links (#94744) 2023-06-27 20:31:41 +02:00
Marcel van der Veldt
e7f29263e3 Fix sending a (default) pincode to Matter Lock operations (#95402) 2023-06-27 20:27:48 +02:00
Mick Vleeshouwer
99a622c8ee Bump pyoverkiz to 1.9.0 (#95400) 2023-06-27 20:25:31 +02:00
Erik Montnemery
179e1da164 Use entity registry id in text device actions (#95398) 2023-06-27 20:24:40 +02:00
Franck Nijhof
d7b7deb95f Improve climate turn_on service (#94645) 2023-06-27 20:17:13 +02:00
Eric Severance
bbae2061e7 Add wemo options enable_subscription & enable_long_press (#56972)
* Add wemo options enable_subscription & enable_long_press

* Also add polling_interval_seconds option

* Give feedback about invalid option combinations

* Use a frozen dataclass for Options

* Validate polling_interval_seconds

* Describe message arg

* Replace broad exception with PyWeMoException
2023-06-27 20:10:13 +02:00
Joost Lekkerkerker
6a85e227db Show all YouTube subscriptions in config flow (#94287) 2023-06-27 20:07:44 +02:00
Franck Nijhof
48776f86dc Use identify device class in Elgato identify button entity (#95361)
* Use identify device class in Elgato identify button entity

* Clean up strings
2023-06-27 13:59:49 -04:00
Erik Montnemery
0fc51ac75a Remove current humidity humidifier device trigger (#95394) 2023-06-27 19:55:59 +02:00
Richard Kroegel
f1a54a510c Re-add "deactivate air conditioning" button to bmw_connected_drive (#94765) 2023-06-27 19:55:46 +02:00
Mike Knoop
2092bd225d Distinguish multiple raise lower buttons on one Lutron keypad (#92380) 2023-06-27 19:52:46 +02:00
Erik Montnemery
e18f7dffb0 Teach validate_config to validate lists of conditions (#95380)
* Teach validate_config to validate lists of conditions

* Update test
2023-06-27 19:44:23 +02:00
Joost Lekkerkerker
e8cb9fba7b Add entity translations to Geocaching (#95396) 2023-06-27 19:42:55 +02:00
Paulus Schoutsen
243abf32c0 Add test to stop action (#95376) 2023-06-27 19:38:30 +02:00
Paul Bottein
8b25fd8563 Use total increasing for ecowitt precipitation and lightning count (#90099) 2023-06-27 19:32:06 +02:00
Maciej Bieniek
8d6a711cac Make unique_id of the Shelly button entity immutable (#95160) 2023-06-27 19:10:12 +02:00
aschmitz
1dc9c77a3e Tag Aranet diagnostic entities appropriately (#95218) 2023-06-27 18:56:46 +02:00
Joost Lekkerkerker
e4eb7e4796 Add entity translations to FireServiceRota (#95337) 2023-06-27 18:55:40 +02:00
Joost Lekkerkerker
09bfb08067 Add entity translations to Flume (#95350) 2023-06-27 18:54:32 +02:00
Joost Lekkerkerker
0b32a6e0d1 Use shorthand attributes for freedompro (#95358) 2023-06-27 18:53:29 +02:00
Joost Lekkerkerker
b0834472bc Use device class translations for Fritz (#95362) 2023-06-27 18:48:03 +02:00
Erik Montnemery
68db751ce1 Refactor template image (#95353) 2023-06-27 18:46:36 +02:00
Joost Lekkerkerker
1a8bc1930c Add entity translations to FiveM (#95370) 2023-06-27 18:44:26 +02:00
Franck Nijhof
4b9bfe9a50 Support importing Blueprints from the Home Assistant websites (#95340)
* Support importing Blueprints from the Home Assistant websites

* Improve test coverage
2023-06-27 12:40:53 -04:00
J. Nick Koston
a8b2c1edfa Add more coverage for ESPHome lights (#95384) 2023-06-27 18:27:09 +02:00
Erik Montnemery
bff4b0c79c Use entity registry id in arcam_fmj device triggers (#95391) 2023-06-27 18:25:17 +02:00
Erik Montnemery
5a90a44233 Use entity registry id in kodi device triggers (#95392) 2023-06-27 18:24:53 +02:00
Erik Montnemery
1fec407a24 Set scripts which fail validation unavailable (#95381) 2023-06-27 18:24:34 +02:00
Erik Montnemery
17ac1a6d32 Set automations which fail validation unavailable (#94856) 2023-06-27 18:23:33 +02:00
Pascal Vizeli
5c4d010b90 Fix machine build templates (#95393) 2023-06-27 18:00:12 +02:00
Joost Lekkerkerker
8bbb396048 Move freedompro coordinator to separate file (#95360)
* Move coordinator to separate file for freedompro

* Move coordinator to separate file for freedompro
2023-06-27 17:48:36 +02:00
Joakim Sørensen
db01aecb02 Add contents to connection_info handler in cloud client (#95059) 2023-06-27 17:45:41 +02:00
Robert Hillis
cd26de73b4 Add button platform to Dremel 3D printer (#94517)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-27 17:44:29 +02:00
Franck Nijhof
3e85a29b86 Move overlapping pylint rules to ruff, disable mypy overlap (#94359) 2023-06-27 17:42:46 +02:00
disforw
7c676c0a7d Add config_flow to QNAP (#80450)
* Create config_flow.py

* Update __init__.py

* Create const.py

* Create strings.json

* Update sensor.py

* Update manifest.json

* Update manifest.json

* Add device name to entities

* Correcting health sensor

* Update manifest.json

* Adding integration_type

* Update sensor.py

* Update __init__.py

* Enums

* Update sensor.py

* Removed unused notify_create

* Switch to SensorDeviceClass.TEMPERATURE

* Update enums

* Remove SENSOR_TYPES from const.py

* Add SENSOR_TYPES to sensor.py

* Removed dependancies

* Removed import yaml

* Removed entity_registry_enabled_default

* Update const.py remove dups

* Update manifest.json removed dups

* Update __init__.py

* Update const.py

* Update manifest.json

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Update sensor.py remove unused

* Update sensor.py add docstring

* Update sensor.py add super

* Remove FOLDER sensors

* Remove VOLUME_NAME

* fix cli

* fix cli

* Add config flow tests

* Update requirements_test_all.txt

* Update CODEOWNERS

* Update homeassistant/components/qnap/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update __init__.py

Change unload to walrus
Remove async_setup

* Update const.py remove PLATFORMS

* Update __init__.py add Platform Enum

As per epenet

* Update __init__.py

* Update config_flow.py

* Update sensor.py

* Update __init__.py

ruff

* Update config_flow.py

Ruff

* Update sensor.py

* Update const.py remove attrs

* Update sensor.py add attrs

* Revert tuple for sensor extend

* Update sensor.py

* Update coordinator.py

* Update coordinator.py

* Update sensor.py

* Update coordinator.py

* Update homeassistant/components/qnap/__init__.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/const.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/__init__.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update coordinator.py

* Update __init__.py

* Update coordinator.py

* Update sensor.py

* Add device_info

* Update sensor.py

* Update sensor.py self._attr_unique_id

* Update sensor.py

* Update sensor.py

* Type Hints

* Move tuples

* Drive sensor name

* Remove caps

* Remove caps

* Add YAML import

* Update sensor.py fix ruff

* Revert tuples

* Update sensor.py as per review

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Update sensor.py

* assert uid is not None

* Update homeassistant/components/qnap/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update .coveragerc

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/const.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/const.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update sensor.py

* Update config_flow.py add imports

* Update const.py

* Update sensor.py move confs to const

* Update config_flow.py add const

* Update test_config_flow.py remove const name

* Update test_config_flow.py remove standard result const

* Update test_config_flow.py

* Combine tests

* Update test_config_flow.py

* Update config_flow.py

* Update test_config_flow.py

* Update config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update sensor.py change UID as requested

* Update sensor.py added check for monitor_device

* fix tests

* Remove rounding

* Revert "Remove rounding"

This reverts commit 61bf653c069d37cd7c20e3dd2f555f80b6e5d94f.

---------

Co-authored-by: starkillerOG <starkiller.og@gmail.com>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-06-27 17:42:27 +02:00
Franck Nijhof
43fe30f6ee Use identify device class in ZHA identify button entity (#95373) 2023-06-27 17:42:13 +02:00
Joost Lekkerkerker
e7cc839a96 Add entity translations to Fully Kiosk (#95368) 2023-06-27 17:41:41 +02:00
J. Nick Koston
df65fa3899 Bump pyatv to 0.13.2 (#95388) 2023-06-27 17:38:15 +02:00
Marcel van der Veldt
30fcfaf1ec Some small fixes for the Matter light platform (#95343) 2023-06-27 17:33:10 +02:00
Erik Montnemery
cb22fb16f8 Allow returning a script variable from a script (#95346)
* Allow returning a script variable from a script

* Don't allow returning a template result

* Raise if response variable is undefined

* Add test

* Update homeassistant/helpers/script.py

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Format code

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-27 17:13:53 +02:00
Joost Lekkerkerker
e19b29d6ae Add entity translations to Flux led (#95355) 2023-06-27 16:58:57 +02:00
Marc Mueller
90854df5b2 Add editable install back [ci] (#95379) 2023-06-27 16:10:03 +02:00
Diogo Gomes
96bf8ef8d6 Add Risk of Fire sensor to IPMA (#80295) 2023-06-27 16:00:10 +02:00
Erik Montnemery
f3fc741a71 Bump hass-nabucassa to 0.69.0 (#95367) 2023-06-27 15:29:30 +02:00
Erik Montnemery
190d67b56c Improve content type handling in ImageEntity (#95365) 2023-06-27 15:28:49 +02:00
Franck Nijhof
116dd67472 Use identify device class in LIFX identify button entity (#95372) 2023-06-27 14:52:44 +02:00
J. Nick Koston
878d41a472 Remove senseme integration (#94363) 2023-06-27 14:43:19 +02:00
Joost Lekkerkerker
50e36fbdda Add entity translations to Flick electric (#95345) 2023-06-27 14:38:36 +02:00
Erik Montnemery
071d3a474f Base entity ids on English for languages not using Latin script (#91357) 2023-06-27 14:37:50 +02:00
Dylan Owen
fe28067481 Updated pyopnsense to support a 20 second timeout (#95314)
* Updated pyopnsense to support a timeout

* Self Review

* Removed the yaml configuration portion
2023-06-27 08:31:02 -04:00
Franck Nijhof
9ca0a095ab Use identify device class in HomeWizard identify button entity (#95369) 2023-06-27 14:30:46 +02:00
Joost Lekkerkerker
c1e8eb7c96 Use device class translations for Fritzbox (#95363) 2023-06-27 14:06:57 +02:00
Erik Montnemery
e9eb366f3b Improve MQTT image tests (#95359) 2023-06-27 13:53:38 +02:00
Haim Gelfenbeyn
0c66ccebd1 Verify that the MAC address that Fully Kiosk reported is usable (#94887) 2023-06-27 13:34:07 +02:00
Erik Montnemery
723f6d35b0 Address late review comments on image entity URL support (#95338) 2023-06-27 13:22:59 +02:00
Joost Lekkerkerker
968bc25259 Add entity translations to Flipr (#95344) 2023-06-27 13:20:30 +02:00
Joost Lekkerkerker
f61332c9b4 Clean up forecast_solar const file (#95356) 2023-06-27 13:19:10 +02:00
Joost Lekkerkerker
d8e73b6a6b Move FiveM entity class to separate file (#95348) 2023-06-27 13:17:51 +02:00
Martin Hjelmare
4d2fa5bdbc Onboard Google Translate (#95352) 2023-06-27 13:12:25 +02:00
Joost Lekkerkerker
2c9213baa1 Bump python-opensky to 0.0.10 (#94335) 2023-06-27 13:10:09 +02:00
Jan Bouwhuis
4d05a3ae79 Add url support for mqtt image platform (#95249)
* Add url support for mqtt image platform

* Refactor url fetch code to use base platform

* Update after rebase

---------

Co-authored-by: Erik <erik@montnemery.com>
2023-06-27 12:49:31 +02:00
Joost Lekkerkerker
a80862f3db Add entity translations to Fjaraskupan (#95341) 2023-06-27 12:38:32 +02:00
Franck Nijhof
c225c46853 Clean up device class based entity translations in Community.Sensors (#95011) 2023-06-27 12:31:57 +02:00
Erik Montnemery
3c015f85f4 Revert "Change the device class name volatile organic compounds parts to VOCs ratio" (#95332) 2023-06-27 12:28:31 +02:00
Joakim Sørensen
4d4e7522f4 Adjust the analytics collector to only report configured integrations (#95246) 2023-06-27 12:08:51 +02:00
Erik Montnemery
90c1263501 Adjust image entity URL support (#95330) 2023-06-27 11:59:24 +02:00
Franck Nijhof
39f76b757d Clean up wheels building, removing cp310 abi (#95334) 2023-06-27 11:53:19 +02:00
Franck Nijhof
9de2b6c253 Use Python 3.11 in translations and builder workflows (#95335) 2023-06-27 11:52:45 +02:00
Patrick ZAJDA
58f8f9c82a Add state attribute translations to Switchbot (#90861) 2023-06-27 11:52:20 +02:00
Jan Bouwhuis
22f29e8c84 Add validation of content_type to image entity (#95248) 2023-06-27 11:46:31 +02:00
Joost Lekkerkerker
af7b25d748 Move FiveM coordinator to separate file (#95339)
Move coordinator to separate file
2023-06-27 12:40:38 +03:00
G Johansson
30d22fe49b Add new attributes into Template Weather (#95100) 2023-06-27 11:19:51 +02:00
Pascal Vizeli
b62080cb78 Using builder 2023.06.1 (#95333)
* Using builder 2023.06.1

* revert downgrade of cosign
2023-06-27 10:34:31 +02:00
Joost Lekkerkerker
ba244b7af7 Add entity translations to Efergy (#95291)
* Add entity translations to Efergy

* Add entity translations to Efergy
2023-06-27 10:22:08 +02:00
dependabot[bot]
b12109dcde Bump sigstore/cosign-installer from 3.0.5 to 3.1.0 (#95327)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 10:21:36 +02:00
Robert Hillis
10f116a507 Add entity translations to Google Mail (#95312) 2023-06-27 10:19:47 +02:00
Robert Hillis
16bcbe3d22 Add entity translations to Lidarr (#95313) 2023-06-27 10:19:20 +02:00
Joost Lekkerkerker
4ab8411145 Make Dexcom use shorthand attributes (#95231) 2023-06-27 10:17:09 +02:00
Robert Hillis
7add36d847 Add entity translations to Litterrobot (#95316) 2023-06-27 10:12:02 +02:00
Pascal Vizeli
c3d02d68b7 Fix Cosign Image build (#95328) 2023-06-27 09:29:45 +02:00
Erik Montnemery
c2f7e5840b Use entity registry id in climate device actions (#95268)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-27 09:28:54 +02:00
Robert Hillis
8d1cd39044 Add entity translations to Radarr (#95317) 2023-06-27 08:45:27 +02:00
Joost Lekkerkerker
73bc5a4e8f Add entity translations to Aurora ABB PowerOne (#95132) 2023-06-27 08:42:09 +02:00
Jan Bouwhuis
98cc45ec10 Add image url support (#95301)
* Add image url support

* Use hass as parameter

* Add verify ssl parameter and improve exception handling

* Improve error handling, ignore empty URL's

* Update existing image platforms

---------

Co-authored-by: Erik <erik@montnemery.com>
2023-06-27 08:36:12 +02:00
dougiteixeira
363dab7ce4 Change the device class name volatile organic compounds parts to VOCs ratio (#95126) 2023-06-27 08:33:11 +02:00
Joost Lekkerkerker
2c3a50fdb1 Add entity translations to Awair (#95308) 2023-06-27 08:27:33 +02:00
J. Nick Koston
6d47feb595 Add tests for ESPHome cover platform (#95321) 2023-06-27 08:26:35 +02:00
Paulus Schoutsen
5f14cdf69d Allow stopping a script with a response value (#95284) 2023-06-27 08:24:22 +02:00
Erik Montnemery
51aa2ba835 Use entity registry id in water_heater device actions (#95276) 2023-06-27 08:21:15 +02:00
Erik Montnemery
9dc586bd98 Use entity registry id in number device actions (#95273) 2023-06-27 08:20:45 +02:00
Erik Montnemery
c2457b8574 Use entity registry id in cover device actions (#95269) 2023-06-27 08:20:05 +02:00
J. Nick Koston
0af71851a4 Fix ESPHome button not getting device updates (#95311) 2023-06-26 22:34:37 -05:00
Paulus Schoutsen
d6cd5648b9 Change conversation default agent behavior (#95225)
* Change conversation default agent behavior

* Fix tests
2023-06-26 22:10:17 -04:00
J. Nick Koston
c4288e7b1f Use cached_property in entity.py instead of manual cache (#95307) 2023-06-26 19:18:46 -05:00
Erik Montnemery
398dbed72e Improve type annotations of cached_property backport (#95309) 2023-06-26 18:36:01 -05:00
J. Nick Koston
9fe24c54e9 Add test coverage for ESPHome switch platform (#95306) 2023-06-26 17:49:00 -05:00
Joost Lekkerkerker
dbe4252d34 Add entity translation to Aussie broadband (#95134) 2023-06-26 23:39:02 +02:00
Joost Lekkerkerker
185936deda Use DeviceInfo type for Aurora ABB PowerOne (#95133) 2023-06-26 23:36:06 +02:00
Michael Hansen
b70a67404b Check end stage as well when preparing pipeline (#95303) 2023-06-26 16:36:02 -05:00
Joost Lekkerkerker
9734f45202 Add entity translations to Eufylife BLE (#95296) 2023-06-26 23:32:37 +02:00
Erik Montnemery
a568885ad2 Add backport of cached_property from CPython 3.12 (#95292) 2023-06-26 16:23:07 -05:00
Joost Lekkerkerker
b02cb56988 Clean up Awair const (#95135) 2023-06-26 23:22:43 +02:00
Erik Montnemery
3635508a08 Use entity registry id in vacuum device actions (#95275) 2023-06-26 23:21:15 +02:00
Joost Lekkerkerker
a44f3e62e3 Add entity translations to Energyzero (#95293) 2023-06-26 23:20:34 +02:00
Joost Lekkerkerker
cb9cbdfb28 Add entity translations to ecobee (#95281) 2023-06-26 23:12:48 +02:00
Erik Montnemery
320003bf15 Use entity registry id in lock device actions (#95272) 2023-06-26 23:09:26 +02:00
Erik Montnemery
b12c5a5ba2 Use entity registry id in humidifier device actions (#95270) 2023-06-26 23:08:30 +02:00
Joost Lekkerkerker
ad9bf431a8 Add entity translations to filesize (#95299) 2023-06-26 23:06:27 +02:00
J. Nick Koston
7737271a30 Migrate esphome alarm_control_panel platform to use _on_static_info_update (#94961) 2023-06-26 22:58:17 +02:00
Michael Hansen
0f08e6699c Add VAD sensitivity to ESPHome (#95283)
* Change to "finished speaking detection"

* Add select entity to ESPHome for finished speaking detection

* Fix entity name

* Use vad select in stt stream

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-26 16:47:32 -04:00
Robert Hillis
c6775920f5 Tweak Dremel 3D Printer sensors (#94552) 2023-06-26 22:39:10 +02:00
Erik Montnemery
4efe217d9b Use entity registry id in select device actions (#95274) 2023-06-26 22:29:14 +02:00
Joost Lekkerkerker
ec120608c2 Add entity translations to edl21 (#95289) 2023-06-26 22:28:12 +02:00
Erik Montnemery
433d640071 Use entity registry id in light device actions (#95271) 2023-06-26 22:27:19 +02:00
Paulus Schoutsen
bc8be9caea Rename HomeKit Controller to HomeKit Device (#95286) 2023-06-26 22:26:16 +02:00
Joost Lekkerkerker
2872b6cf61 Add entity translations to Environment Canada (#95295) 2023-06-26 22:23:43 +02:00
Erik Montnemery
9b1b0937eb Use entity registry id in button device actions (#95267) 2023-06-26 22:22:15 +02:00
J. Nick Koston
fde82ee323 Keep esphome update entity available when disconnected is expected (#95278) 2023-06-26 22:20:56 +02:00
starkillerOG
0bec93fa37 Reolink ONVIF long polling (#94770) 2023-06-26 21:54:40 +02:00
Petro31
f9707cc87b Add optional limits to compensation sensors (#85886)
Co-authored-by: Tom Harris <tomharris@harrisnj.net>
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-26 14:36:59 -05:00
Erik Montnemery
b71e0302d6 Use entity registry id in sensor device conditions (#95260) 2023-06-26 21:20:40 +02:00
Erik Montnemery
2930845b23 Use entity registry id in vacuum device conditions (#95261) 2023-06-26 20:31:06 +02:00
Erik Montnemery
eb7ad2eb09 Use entity registry id in select device conditions (#95259) 2023-06-26 20:30:29 +02:00
Erik Montnemery
4021662b48 Use entity registry id in media_player device conditions (#95258) 2023-06-26 20:30:22 +02:00
Erik Montnemery
2cfa889750 Use entity registry id in lock device conditions (#95257) 2023-06-26 20:30:05 +02:00
Erik Montnemery
c4589ad4e5 Use entity registry id in fan device conditions (#95255) 2023-06-26 20:29:52 +02:00
Erik Montnemery
16ec9b1e9f Use entity registry id in device_tracker device conditions (#95254) 2023-06-26 20:29:39 +02:00
Erik Montnemery
a691846b5d Use entity registry id in climate device conditions (#95252) 2023-06-26 20:29:28 +02:00
Franck Nijhof
c1a37185b4 Mark Plugwise Illuminance sensor as diagnostic (#95240) 2023-06-26 19:40:30 +02:00
Richard Kroegel
410b15df92 Improve exception handling for BMW remote services (#92199)
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-06-26 19:05:50 +02:00
Marc Mueller
f5975d4039 Update build system (#95237) 2023-06-26 19:03:56 +02:00
Joost Lekkerkerker
1525901ffc Add entity translations to dormakaba (#95230) 2023-06-26 19:02:52 +02:00
Álvaro Fernández Rojas
3f0393154e Remove unused ConfigEntry from Airzone Cloud entities (#95103) 2023-06-26 18:58:51 +02:00
Joost Lekkerkerker
844a1ebbc6 Add entity translations to BMW Connected Drive (#95142) 2023-06-26 18:57:56 +02:00
Paulus Schoutsen
d95c241a1a Add service response values to service descriptions (#95262) 2023-06-26 12:57:43 -04:00
Martin Hjelmare
fa03324bbd Remove stale dep from google translate (#95247) 2023-06-26 18:49:01 +02:00
Joost Lekkerkerker
36ded01264 Add entity translations to Blink (#95138) 2023-06-26 18:29:33 +02:00
Erik Montnemery
07936884a3 Use entity registry id in alarm_control_panel device conditions (#95250) 2023-06-26 18:26:21 +02:00
Joost Lekkerkerker
a64940cf42 Use shorthand attribute for EAFM (#95233) 2023-06-26 18:25:39 +02:00
Joost Lekkerkerker
9e3706e3b9 Move Aurora entity to separate file (#95245) 2023-06-26 18:24:14 +02:00
Joost Lekkerkerker
91e6e918c3 Code tidyness for Dexcom (#95232) 2023-06-26 18:22:44 +02:00
Erik Montnemery
f0493b22d4 Use entity registry id in binary_sensor device conditions (#95251) 2023-06-26 18:17:27 +02:00
Erik Montnemery
02ad93db53 Use entity registry id in cover device conditions (#95253) 2023-06-26 18:14:23 +02:00
Erik Montnemery
e77a06412a Use entity registry id in humidifier device conditions (#95256) 2023-06-26 18:13:48 +02:00
Mick Vleeshouwer
de1b5626e1 Set explicit None for entity name in Overkiz when using device name (#95238) 2023-06-26 18:11:57 +02:00
dougiteixeira
39229ce098 Add the device of the source entity in the helper entities for Utility Meter (#94734)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-06-26 18:08:13 +02:00
dougiteixeira
403496eb92 Add the device of the source entity in the helper entities for Derivative (#94751)
* Adds the device of the original entity in the helper entities for Derivative

* Update

* Update
2023-06-26 18:06:25 +02:00
dougiteixeira
26016b29f7 Add the device of the source entity in the helper entities for Threshold (#94753) 2023-06-26 18:05:11 +02:00
G Johansson
537cc9ed86 Use new attributes in Met (#95099) 2023-06-26 18:04:10 +02:00
Erik Montnemery
89c9e72768 Use entity registry id in alarm_control_panel device actions (#95241) 2023-06-26 16:59:43 +02:00
Erik Montnemery
8e2ba81995 Add image platform to the template integration (#94928)
* Add image platform to the template integration

* Set a default name

* Fix typo

* Add tests

* Improve test coverage

* Derive content-type from fetched image
2023-06-26 15:54:51 +02:00
Erik Montnemery
8fda56d2c9 Stable entity registry id when a deleted entity is restored (#77710)
* Stable entity_id and registry id when a deleted entity is restored

* Don't restore area_id

* Don't restore entity_id

* Address review comments
2023-06-26 15:54:35 +02:00
Nalin Mahajan
f08f0fbb8b Fix control4 light switches on OS 3.3+ (#95196) 2023-06-26 15:49:44 +02:00
Franck Nijhof
5bd5ca8433 Add identify device class to button (#95244) 2023-06-26 15:46:37 +02:00
Jan Bouwhuis
1029bcbbd3 Add mqtt image platform (#94769)
* Add mqtt image platform

* Follow up comments

* Use separate topics

* Set last_ image to `None` on error

* Fix encoding and schema validation

* Assing None to last_image when get image fails

* Follow up comment

* Remove content_type validation

* Add validation

* Rename options according suggestions

* Remove url_topic / template feature from PR

* Always set content_type
2023-06-26 14:42:24 +02:00
Joost Lekkerkerker
7dae17a404 Add entity translations to Dremel 3D printer (#95234) 2023-06-26 14:37:04 +02:00
Pascal Vizeli
c75e831b65 Cosign support (#95236) 2023-06-26 14:32:02 +02:00
Dan
45ff9d8f63 Allow rounding two decimal places for Flume usage sensors (#95219) 2023-06-26 14:31:28 +02:00
Paulus Schoutsen
a31e899741 Pass correct parameter when resolving media via WS (#90897) 2023-06-26 14:24:12 +02:00
J. Nick Koston
021a39a09c Make deep sleep esphome entities unavailable on unexpected disconnect (#95211) 2023-06-26 14:21:45 +02:00
Joost Lekkerkerker
5a98155700 Add entity translations for EasyEnergy (#95235) 2023-06-26 14:17:15 +02:00
Joost Lekkerkerker
d14f04eb7e Move Aurora coordinator to separate file (#95130) 2023-06-26 12:52:31 +02:00
Marc Mueller
8ccb0c3e14 Update types packages (#95222) 2023-06-26 12:49:18 +02:00
J. Nick Koston
ad17a89531 Add additional coverage for ESPHome sensor and number (#95226) 2023-06-26 12:29:38 +02:00
Álvaro Fernández Rojas
74fb1ba51d Update aioairzone-cloud to v0.1.9 (#95155) 2023-06-26 12:02:32 +02:00
Erik Montnemery
a338e7e242 Use entity registry id in toggle_entity device automations (#94995)
* Use entity registry id in toggle_entity device automations

* Update tests

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-26 09:59:01 +02:00
Marc Mueller
408c613731 Update mypy to 1.4.1 (#95220) 2023-06-25 21:32:06 -05:00
J. Nick Koston
3b7095c63b Fix esphome not removing entities when static info changes (#95202)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-25 21:31:31 -05:00
Kevin Cathcart
d700415045 Support notification_id in notify.persistent_notification (#74822)
* Support notification_id in notify.persistent_notification

* Apply suggestions from code review

Co-authored-by: Scott Giminiani <ScottG489@Gmail.com>

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Scott Giminiani <ScottG489@Gmail.com>
2023-06-25 22:25:58 -04:00
J. Nick Koston
85d6e03dd3 Require newly configured esphome device to allow Home Assistant service calls (#95143)
* Require esphome service calls to be enabled

For existing devices, calling Home Assistant services continues
to be allowed.

For newly configured devices, it must now be enabled in the options
flow

* fix

* adjust

* coverage

* adjust

* fix test

* Update homeassistant/components/esphome/strings.json

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Update homeassistant/components/esphome/strings.json

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Update homeassistant/components/esphome/strings.json

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Update homeassistant/components/esphome/__init__.py

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Update homeassistant/components/esphome/__init__.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update homeassistant/components/esphome/__init__.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-25 21:18:21 -04:00
Matthias Alphart
f4756fe1f9 Update xknx to 2.11.0: Add support for Light DPT 9 color temperature (#95213)
Update xknx to 2.11.0
2023-06-25 21:05:35 -04:00
Allen Porter
1d9821efa2 Fix spelling mistake in script.py (#95210)
Update script.py
2023-06-25 21:00:50 -04:00
J. Nick Koston
c1045d6c82 Fix hass_storage not clearing task (#95209)
hass_storage would never allow another load if the
no data path was hit

discovered while writing tests for https://github.com/home-assistant/core/pull/95202
2023-06-25 19:54:02 -04:00
Maciej Bieniek
62e518badb Add new attributes to OpenWeatherMap weather entity (#95173)
* Add new attrs to current condition

* Add new attrs to forecast
2023-06-25 16:30:59 +02:00
G Johansson
67586caaf9 Cleanup ping (#95168) 2023-06-25 09:00:52 -05:00
J. Nick Koston
9051750add Cache entity translation lookups and keys (#95180) 2023-06-25 08:50:48 -05:00
Matthias Alphart
2ce23c17ca Update KNX frontend - add Group monitor telegram detail view (#95144)
* Use TelegramDict for WS communication

* Update knx_frontend
2023-06-25 14:58:08 +02:00
Joost Lekkerkerker
f84887d5f8 Use device class translations for Coolmaster (#95182) 2023-06-25 13:10:37 +02:00
Joost Lekkerkerker
dffe468ceb Use device class translations for Broadlink (#95183) 2023-06-25 13:01:22 +02:00
Joost Lekkerkerker
58ddd17495 Add entity translations to Deluge (#95184)
* Add entity translations to Deluge

* Update sensor.py

* Fix black
2023-06-25 12:59:04 +02:00
Allen Porter
528c206094 Add script specific error messages for response_variable (#95188) 2023-06-24 21:34:57 -07:00
J. Nick Koston
ef2e55ecec Add dual IP stack support to HomeKit (#94126)
* Add dual IP stack support to HomeKit

* fix tests

* Update homeassistant/components/network/__init__.py

* remove scopes

* Bump HAP-python to 4.7.0

fixes pairing with newer iOS

changelog: https://github.com/ikalchev/HAP-python/compare/v4.6.0...4.7.0

* fixes

* update tests

* Relocate get_announced_addresses from zeroconf to network

needed for #94126

* rename

* rename

* Update homeassistant/components/network/__init__.py

* Update homeassistant/components/network/__init__.py

* rename

* fix import

* coverage
2023-06-24 23:18:38 -04:00
J. Nick Koston
57a910a144 Relocate esphome entity code into its own module (#95092) 2023-06-24 23:12:36 -04:00
J. Nick Koston
79f9a8a257 Add test coverage for esphome lock platform (#95023) 2023-06-24 23:10:47 -04:00
J. Nick Koston
9eedc8a602 Fix esphome binary sensors when state is missing (#95140)
* Fix esphome binary sensors when state is missing

* Fix esphome binary sensors when state is missing

* Fix esphome binary sensors when state is missing
2023-06-24 23:09:26 -04:00
J. Nick Koston
c6b3d538de Remove deprecated non-native number support (#95178)
* Remove deprecated non-native number support

These were scheduled to be removed in 2022.10 but were left
in to give custom component authors a bit more time.

Its been a year since they were deprecated so its time
to remove the old code

https://developers.home-assistant.io/blog/2022/06/14/number_entity_refactoring/

* strip unneeded change from testing
2023-06-24 23:01:44 -04:00
Joost Lekkerkerker
fa334cf2bd Add entity translations to Big Ass Fans (#95136) 2023-06-24 19:00:20 -05:00
J. Nick Koston
c8430e4557 Bump aiooncue to 0.3.5 (#95148) 2023-06-24 15:12:02 -05:00
J. Nick Koston
74d342a000 Bump sense-energy to 0.12.0 (#95151) 2023-06-24 15:11:13 -05:00
J. Nick Koston
3ea26efac9 Retry solaredge on socket.gaierror (#95153) 2023-06-24 15:10:54 -05:00
J. Nick Koston
5059cee53f Reduce overhead to fire events (#95163) 2023-06-24 14:39:13 -05:00
J. Nick Koston
9354df975c Reduce overhead to set up and write entity state (#95162) 2023-06-24 14:16:28 -05:00
J. Nick Koston
7c49324f18 Bump aioesphomeapi to 14.1.1 (#95166) 2023-06-24 14:15:51 -05:00
Joost Lekkerkerker
e4a7c57b81 Use device class translations for Airly (#95115)
* Use device class translations for Airly

* Use device class translations for Airly

* Use device class translations for Airly
2023-06-24 13:13:36 +02:00
Franck Nijhof
a2f9caa482 Clean up device class based entity translations in Elgato (#95122)
* Clean up device class based entity translations in Elgato

* Update snapshots
2023-06-24 12:45:47 +02:00
Maciej Bieniek
fe9366eee6 Add new properties to the weather entity in Accuweather integration (#95110)
* Add new properties to the current conditions

* Add new properties to forecast

* Use existing constants

* Update tests
2023-06-24 12:38:20 +02:00
Allen Porter
b9b5fe6be8 Add service response data for listing calendar events (#94759)
* Add service response data for listing calendar events

Add the capability of response data for for the entity component.

* Rename input arguments and add service description

* Improve list events to be more user friendly

Allow the end date to be determined based on a relative time duration. Make the start time optional and set to "now". Add additional test coverage. Update demo calendar to actually perform date range checks.

* Wrap docstrings properly.

* Increase test coverage

* Update to use new API calls

* Readability improvements

* Wrap docstrings

* Require at least one of end or duration

* Check for multiple entity matches earlier in the request

* Update documentation strings
2023-06-23 23:34:34 -04:00
Michael Hansen
65454c945d Add VAD sensitivity option to VoIP devices (#94688)
* Add VAD sensitivity option to VoIP devices

* Use select entitiy for VAD sensitivity

* Add sensitivity to tests

* Add to assist pipeline tests

* Update homeassistant/components/assist_pipeline/select.py

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Update tests/components/voip/test_voip.py

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-23 23:28:13 -04:00
Paulus Schoutsen
c42d0feec1 Allow passing in device_id to pipeline run WS API (#95139) 2023-06-23 21:29:56 -05:00
Paulus Schoutsen
3f10233833 Add return value to conversation.process service (#94740)
* Add return value to conversation.process service

* Adjust for new API
2023-06-23 13:32:03 -04:00
Franck Nijhof
78222bd51c 2023.6.3 (#95119) 2023-06-23 19:08:57 +02:00
dougiteixeira
00075520c2 Add volatile_organic_compounds_parts to device class selector strings for Scrape (#95128)
Add  to device class selector strings for Scrape
2023-06-23 18:48:29 +02:00
Franck Nijhof
9f6dab0643 Remove incompatible config schema for Fully Kiosk 2023-06-23 17:56:25 +02:00
Franck Nijhof
31a2b2e3a9 Clean up device class based entity translations in Rituals Perfume Genie (#95124) 2023-06-23 17:24:57 +02:00
Franck Nijhof
4cf9beccd8 Bumped version to 2023.6.3 2023-06-23 16:46:52 +02:00
Matthias Alphart
8f9425f09f Fix KNX device trigger passing info data (#95076) 2023-06-23 16:46:33 +02:00
Marcel van der Veldt
0fa954040e Fix removal of orphaned Matter devices (#95044) 2023-06-23 16:46:30 +02:00
Hmmbob
e26b8e11d3 Fix goodwe midnight error (#95041) 2023-06-23 16:45:56 +02:00
Richard Kroegel
ced6968e85 Bump bimmer_connected to 0.13.7 (#95017) 2023-06-23 16:45:16 +02:00
Raman Gupta
44e7243e25 Fix zwave_js device diagnostics dump (#94999)
* Fix zwave_js device diagnostics dump

* Update tests/components/zwave_js/test_diagnostics.py

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

* Update tests/components/zwave_js/test_diagnostics.py

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

* Update tests/components/zwave_js/test_diagnostics.py

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

* Update tests/components/zwave_js/test_diagnostics.py

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

* Update tests/components/zwave_js/test_diagnostics.py

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

* Update tests/components/zwave_js/test_diagnostics.py

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

* improve test

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-23 16:43:34 +02:00
Marcel van der Veldt
bbbc9f646f Bump Matter Server to 3.5.1: some small fixes and stability improvements (#94985) 2023-06-23 16:43:31 +02:00
epenet
cda784c969 Add error handling to hassio issues (#94951) 2023-06-23 16:43:28 +02:00
Quentame
34ef89b16b Fix Meteo France blocked config entry when weather alert API fails (#94911)
* Fix: do not block config entry when weather alert API fails

* PR review
2023-06-23 16:43:24 +02:00
Allen Porter
f8cfaa6147 Bump ical to 4.5.4 (#94894) 2023-06-23 16:43:21 +02:00
Álvaro Fernández Rojas
5da5522481 Update aioairzone to v0.6.4 (#94873) 2023-06-23 16:43:18 +02:00
Ernst Klamer
cee8004641 Bump bthome to 2.12.0 (#94822) 2023-06-23 16:43:15 +02:00
J. Nick Koston
e1751647f4 Bump HAP-python to 4.7.0 (#94812) 2023-06-23 16:43:11 +02:00
Austin Mroczek
f33d671a5d Fix Totalconnect BinarySensorDeviceClass logic (#94772)
* handle temperature

* test for temperature

* test for unknown
2023-06-23 16:43:07 +02:00
Jan Čermák
254b1fd314 Fix warning from rapt_ble caused by payload version 2 (#94718) 2023-06-23 16:43:04 +02:00
Raman Gupta
89c6494056 Fix zwave_js trigger event reattach logic (#94702) 2023-06-23 16:43:01 +02:00
Dirk Sarodnick
b52cfd3324 Fix bluetooth tracker asyncio usage (#94695)
* fix for asyncio usage

fixes the error "Passing coroutines is forbidden, use tasks explicitly", caused by passing an async function into asyncio.wait directly instead of creating a task for it.

* removes unnecessary default param

* corrects formatting for black
2023-06-23 16:42:55 +02:00
Joost Lekkerkerker
6329f6bc07 Add strings for YouTube reauthentication (#94655) 2023-06-23 16:38:29 +02:00
Joost Lekkerkerker
57dd62e7d6 Make YouTube select lower quality thumbnails (#94652)
* Make YouTube select lower quality thumbnails

* Make YouTube select lower quality thumbnails

* Make YouTube select lower quality thumbnails

* Make YouTube select lower quality thumbnails

* Add tests

* Add tests

* Add tests

* Add tests

* Add tests
2023-06-23 16:38:21 +02:00
Dominik
203820d836 Fix glances raid plugin data (#94597)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-06-23 16:38:14 +02:00
Dominik
e1c486fc4a Bump minimum typing_extensions to 4.6.3 (#94587) 2023-06-23 16:37:27 +02:00
Alistair Tudor
78bbec0a6e Fix unit for Habitica text sensors (#94550) 2023-06-23 16:35:33 +02:00
Tom Harris
ffe35c73b6 Handle Insteon events correctly (#94549)
Make events generalized
2023-06-23 16:35:30 +02:00
Joost Lekkerkerker
d2385f97a7 Handle LastFM unavailable (#94456) 2023-06-23 16:35:27 +02:00
Kim Frellsen
bd0b8dc0bc Fortios device tracker updates (#92331)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-06-23 16:35:24 +02:00
Mike Heath
3f936993a9 Register Fully Kiosk services regardless of setup result (#88647)
* Register services at integration level

If HA is unable to connect to Fully Kiosk, the services don't get
registered. This can cause repair to create notifications saying
that the 'fully_kiosk.load_url' service is unknown.

Fixes #85444

* Validate config entry is loaded

* Refactor service invocation

Raises `HomeAssistantError` when the user provides an device id that is
not in the device registry or a device that is not a Fully Kiosk
device. If the device's config entry is not loaded, a warning is
logged.

* Update homeassistant/components/fully_kiosk/services.py

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

* Assert HomeAssistantError when integration unloaded

* Remove unused import

* Set CONFIG_SCHEMA

* Update homeassistant/components/fully_kiosk/__init__.py

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

* Add test for non fkb devices targets in service calls

* Apply suggestions from code review

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-23 16:35:19 +02:00
Álvaro Fernández Rojas
cd66da0ab1 Add Airzone Cloud Binary Sensors support (#93583)
* airzone_cloud: add Binary Sensors support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: binary_sensor: fix copy&paste

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: remote available attribute

This is not working as expected and will require minor library changes.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: binary_sensor: remove unique_id

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: binary_sensors: remove name

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: use entity_name

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: binary_sensor: add name=None

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: binary_sensor: fix device class name

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Update homeassistant/components/airzone_cloud/binary_sensor.py

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

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-06-23 16:32:40 +02:00
starkillerOG
2702124130 Motion blinds improve async_request_position_till_stop (#93304) 2023-06-23 16:26:34 +02:00
J. Nick Koston
85a9654e52 Remove signal strength device class from hunterdouglas_powerview (#95113) 2023-06-23 16:11:19 +02:00
Joost Lekkerkerker
8fd930ba87 Handle LastFM unavailable (#94456) 2023-06-23 15:34:37 +02:00
Franck Nijhof
4255cd6bbc Remove invalid Signal Strength device class from Ondilo (#95109) 2023-06-23 08:26:57 -05:00
Daniel Kent
983ff10541 Fix ESPHome color temperature precision for light entities (#91424)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-23 08:08:28 -05:00
G Johansson
91611bbd3b Add missing apparent temp in forecast (#95108) 2023-06-23 14:49:11 +02:00
Marc Mueller
6033f39a0d Partial revert "Add TypeVar defaults for DataUpdateCoordinator (#95026)" (#95101)
* Revert "Add TypeVar defaults for DataUpdateCoordinator and EntityComponent (#95026)"

This reverts commit 90f5b1c323.

* Don't revert everything
2023-06-23 14:42:34 +02:00
Dominik
239f5fe56b Fix glances raid plugin data (#94597)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-06-23 14:36:43 +02:00
Álvaro Fernández Rojas
e5c1ce65df Use entity name in Airzone Cloud sensors (#95102) 2023-06-23 14:26:38 +02:00
dependabot[bot]
e581d6c90b Bump Wandalen/wretry.action from 1.2.0 to 1.3.0 (#95098)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-23 14:20:17 +02:00
Franck Nijhof
167f4b475d Clean up device class based entity translations in Verisure (#95082) 2023-06-23 14:01:31 +02:00
J. Nick Koston
3d8bf33d03 Add test coverage for esphome alarm control panels (#95090) 2023-06-23 12:59:05 +01:00
G Johansson
9656173d5c Fix Smhi name (#95097)
smhi no name
2023-06-23 11:37:52 +02:00
G Johansson
071679f91f Use new attributes in Smhi (#95096) 2023-06-23 11:32:20 +02:00
G Johansson
5d365ecb6b Implement Wind Gust speed in Weather entity component (#95065)
* Weather wind gust speed

* strings

* No compat
2023-06-23 08:22:46 +02:00
Michael Hansen
d811fa0e74 Sentence trigger (#94613)
* Add async_register_trigger_sentences for default agent

* Add trigger response and trigger handler

* Check callback in test

* Clean up and move response to callback

* Add trigger test

* Drop TriggerAction

* Test we pass sentence to callback

* Match triggers once, allow multiple sentences

* Don't use trigger id

* Use async callback

* No response for now

* Use asyncio.gather for callback responses

* Fix after rebase

* Use a list for trigger sentences

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-22 18:29:34 -05:00
Arjan
29ef925d73 Add humidity to weather forecast (#95064)
* allow humidty in forecast

* Add tests

* float

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-06-23 00:22:07 +02:00
dougiteixeira
e5afff7f98 Add the device of the source entity in the helper entities for Riemann sum integral (#94727) 2023-06-23 00:04:51 +02:00
Jonas Bergler
3db8bcdd50 Bump pyemby to 1.9 (#94743) 2023-06-23 00:00:27 +02:00
Stephan Uhle
52a4561c7e Code quality update for EDL21 (#94885) 2023-06-22 23:58:43 +02:00
Guido Schmitz
d804d3fca3 Use snapshot for devolo Home Network diagnostics test (#94966) 2023-06-22 23:56:09 +02:00
Franck Nijhof
a48030f5dd Name unnamed buttons by their device class (#95084) 2023-06-22 23:51:41 +02:00
Franck Nijhof
e68916b2fc Name unnamed numbers by their device class (#95083) 2023-06-22 23:48:49 +02:00
G Johansson
893b74d77e Add missing test for Apparent temperature in Weather component (#95080) 2023-06-22 23:19:51 +02:00
G Johansson
eafddaae83 Implement Cloud coverage in Weather entity component (#95068) 2023-06-22 23:10:36 +02:00
G Johansson
b8de7df609 Implement dew point in weather entity component (#95072) 2023-06-22 21:34:23 +02:00
J. Nick Koston
fe71ed8c50 Add esphome media player tests (#95069) 2023-06-22 21:28:58 +02:00
J. Nick Koston
3d12c7409d Add basic light tests to esphome (#95029) 2023-06-22 21:22:29 +02:00
Matthias Alphart
733bca88f1 Fix KNX device trigger passing info data (#95076) 2023-06-22 21:13:10 +02:00
J. Nick Koston
66b2214c55 Add esphome sensor tests (#95077) 2023-06-22 21:02:47 +02:00
J. Nick Koston
c7f2dab13c Add climate tests to esphome (#95045) 2023-06-22 20:31:55 +02:00
J. Nick Koston
dd0e6d6481 Migrate esphome media_player platform to use _on_static_info_update (#95071) 2023-06-22 19:57:09 +02:00
J. Nick Koston
1cf4a008c3 Add coverage for binary_sensor platform to esphome (#95067) 2023-06-22 19:55:28 +02:00
G Johansson
6ad3b60adf Implement Apparent temperature in Weather entity component (#95070) 2023-06-22 19:52:14 +02:00
Michael Hansen
38614bc3f0 Add websocket command to test intent recognition for default agent (#94674)
* Add websocket command to test intent recognition for default agent

* Return results as a list

* Only check intent name/entities in test

* Less verbose output in debug API
2023-06-22 12:24:59 -04:00
J. Nick Koston
1459bf4011 Fix async_scanner_devices_by_address unexpectedly combining Bluetooth scanners (#94990) 2023-06-22 16:50:21 +02:00
Joost Lekkerkerker
6ec6369c27 Add entity translations to AirThings BLE (#95061) 2023-06-22 16:46:06 +02:00
Raman Gupta
5265584159 Fix zwave_js device diagnostics dump (#94999)
* Fix zwave_js device diagnostics dump

* Update tests/components/zwave_js/test_diagnostics.py

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

* Update tests/components/zwave_js/test_diagnostics.py

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

* Update tests/components/zwave_js/test_diagnostics.py

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

* Update tests/components/zwave_js/test_diagnostics.py

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

* Update tests/components/zwave_js/test_diagnostics.py

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

* Update tests/components/zwave_js/test_diagnostics.py

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

* improve test

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-22 10:10:36 -04:00
Joost Lekkerkerker
6ceb973606 Add entity translations for Abode (#94169) 2023-06-22 16:03:28 +02:00
Joost Lekkerkerker
8e93045857 Add entity translations to Airthings (#95052) 2023-06-22 16:02:45 +02:00
Joost Lekkerkerker
acdf309c47 Add entity translations for Aladdin Connect (#95051) 2023-06-22 16:01:51 +02:00
Quentame
ede84d74c7 Fix Meteo France blocked config entry when weather alert API fails (#94911)
* Fix: do not block config entry when weather alert API fails

* PR review
2023-06-22 15:59:48 +02:00
Joost Lekkerkerker
c503becd9a Make AirNow use device class (#94986) 2023-06-22 15:58:14 +02:00
Petro31
e4c8a94aaf Add persistent_notification.dismiss_all service call (#95004) 2023-06-22 14:27:18 +02:00
Jan Bouwhuis
3c86497bc8 Improve mqtt climate turn_on and turn_off service (#94832)
* Improve mqtt climate turn_on and turn_off service

* Remove POWER_COMMAND_TOPIC when mode is changed

* Call super
2023-06-22 13:46:14 +02:00
Joost Lekkerkerker
8987e023a0 Add entity translations for Acmeda (#94170) 2023-06-22 12:01:33 +02:00
Joost Lekkerkerker
04dc85b754 Use device class for AirQ entities (#95037) 2023-06-22 11:56:44 +02:00
Franck Nijhof
e2f5a707ce Fix use_device_name in case device device class translations are used (#95010)
Co-authored-by: Erik <erik@montnemery.com>
2023-06-22 11:30:19 +02:00
J. Nick Koston
ed55632a66 Add esphome fan platform tests and remove unreachable code (#95025) 2023-06-22 11:29:59 +02:00
J. Nick Koston
cd5fdb97c0 Small cleanups to esphome sensor and binary_sensor (#95042) 2023-06-22 11:14:33 +02:00
Erik Montnemery
5884afd485 Teach sensor device trigger about entity registry ids (#94988) 2023-06-22 11:13:54 +02:00
Marcel van der Veldt
3863c561a6 Fix removal of orphaned Matter devices (#95044) 2023-06-22 11:13:14 +02:00
J. Nick Koston
8f6cde5b32 Migrate esphome lock platform to use _on_static_info_update (#95030) 2023-06-22 11:07:51 +02:00
Franck Nijhof
69c2ac1fac Update requests_mock to 1.11.0 (#94298) 2023-06-22 09:46:03 +02:00
J. Nick Koston
adc2df6b8e Callback esphome EntityInfo by platform instead of all platforms (#95021) 2023-06-22 09:39:48 +02:00
dependabot[bot]
05c25d2349 Bump Wandalen/wretry.action from 1.0.36 to 1.2.0 (#95035)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-22 09:38:32 +02:00
Hmmbob
3b24a943ab Fix goodwe midnight error (#95041) 2023-06-22 09:35:53 +02:00
J. Nick Koston
27da7d68de Migrate esphome fan platform to use _on_static_info_update (#95031) 2023-06-22 09:07:13 +02:00
J. Nick Koston
b700400183 Migrate esphome select platform to use _on_static_info_update (#95022) 2023-06-22 09:05:57 +02:00
Erik Montnemery
e204e80528 Teach vacuum device trigger about entity registry ids (#94989) 2023-06-22 08:20:59 +02:00
Marc Mueller
90f5b1c323 Add TypeVar defaults for DataUpdateCoordinator and EntityComponent (#95026) 2023-06-22 03:33:23 +02:00
J. Nick Koston
65a5244d5a Fix race and add test coverage for esphome select platform (#95019) 2023-06-22 01:19:47 +02:00
Richard Kroegel
ef2669afe4 Bump bimmer_connected to 0.13.7 (#95017) 2023-06-22 00:17:13 +02:00
Marcel van der Veldt
b5084dbce2 Bump Matter Server to 3.5.1: some small fixes and stability improvements (#94985) 2023-06-21 23:57:33 +02:00
Erik Montnemery
f10256169b Teach homekit about entity registry ids in device triggers (#95009) 2023-06-21 23:28:43 +02:00
J. Nick Koston
235f50a341 Migrate esphome button platform to use _on_static_info_update (#95007) 2023-06-21 22:24:26 +02:00
J. Nick Koston
8d2daaa694 Limit cache size of EntityValues (#94983) 2023-06-21 22:23:35 +02:00
J. Nick Koston
90386bc036 Reduce overhead to fetch unifiprotect attributes (#94976) 2023-06-21 21:41:06 +02:00
Jan Bouwhuis
31f845bfe0 Add current_humidity attribute to mqtt humidifier (#94955) 2023-06-21 19:19:26 +02:00
Joost Lekkerkerker
492ed1b544 Remove superclass from YouTube (#95002) 2023-06-21 18:49:23 +02:00
Joost Lekkerkerker
6230a51695 Remove superclass from GMail Authentication (#95001) 2023-06-21 18:47:53 +02:00
Barry Williams
57c9aad9b1 Migrate Linn / Openhome integration to SSDP config flow (#94564)
* Migrate Linn / Openhome integration to SSDP config flow

* moved device initialisation into __init__

* wait for user step before adding openhome entities

* add CONFIG_SCHEMA

* cover confirmation step in config flow test

* Address comments

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-21 12:46:17 -04:00
centertivevier
61554682d4 Bump slixmpp to 1.8.4 (#94944) 2023-06-21 18:10:30 +02:00
Marc Mueller
86792fcc2f Update mypy to 1.4.0 (#94987) 2023-06-21 16:12:51 +02:00
Erik Montnemery
c8cd469c95 Teach media_player device trigger about entity registry ids (#94979) 2023-06-21 16:09:28 +02:00
J. Nick Koston
367644afe1 Migrate esphome switch platform to use _on_static_info_update (#94962) 2023-06-21 15:41:24 +02:00
J. Nick Koston
e24c2ae55c Avoid fetching both unifiprotect RTSP urls (#94978) 2023-06-21 15:14:57 +02:00
Martin Hjelmare
f9366e5cc7 Migrate google translate to config entries (#93803)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-21 14:58:58 +02:00
Erik Montnemery
22e1feb223 Teach humidifier device trigger about entity registry ids (#94974) 2023-06-21 14:58:11 +02:00
J. Nick Koston
1cb62d776e Migrate esphome cover platform to use _on_static_info_update (#94959) 2023-06-21 14:54:56 +02:00
Erik Montnemery
af97857c87 Teach select device trigger about entity registry ids (#94981) 2023-06-21 14:51:39 +02:00
Erik Montnemery
7f0be78ebb Teach netatmo device trigger about entity registry ids (#94980) 2023-06-21 14:51:24 +02:00
Erik Montnemery
e404441e8c Teach lock device trigger about entity registry ids (#94975) 2023-06-21 14:51:09 +02:00
Erik Montnemery
20be441c9f Teach device_tracker device trigger about entity registry ids (#94972) 2023-06-21 14:51:00 +02:00
Erik Montnemery
49c7d2ff89 Teach cover device trigger about entity registry ids (#94971) 2023-06-21 14:50:40 +02:00
Erik Montnemery
f3defff429 Teach climate device trigger about entity registry ids (#94969) 2023-06-21 14:50:21 +02:00
Erik Montnemery
49ec806046 Teach button device trigger about entity registry ids (#94965)
* Teach button device trigger about entity registry ids

* Update homekit_controller tests
2023-06-21 14:50:11 +02:00
Erik Montnemery
4414f06ed2 Teach binary_sensor device trigger about entity registry ids (#94963)
* Teach binary_sensor device trigger about entity registry ids

* Update deconz test
2023-06-21 14:49:53 +02:00
J. Nick Koston
9d91cfa27f Migrate esphome number platform to use _on_static_info_update (#94958) 2023-06-21 13:13:29 +02:00
J. Nick Koston
9876abcac9 Migrate esphome light platform to use _on_static_info_update (#94960) 2023-06-21 12:31:14 +02:00
Kyle Hildebrandt
dcf8db36b7 Use yt-dlp instead of youtube-dl (#94625)
* Update to use yt-dlp instead of youtube-dl

* Update homeassistant/components/media_extractor/__init__.py

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-21 12:16:58 +02:00
Erik Montnemery
732ce34a66 Remove assert_lists_same test helper (#94904) 2023-06-21 12:10:28 +02:00
Maciej Bieniek
05039036f1 Add compatibility with sleeping Shelly gen2 devices with firmware 1.0.0 (#94864) 2023-06-21 12:01:17 +02:00
RoboMagus
3bacd9df2f Add trigger for persistent_notification (#94809)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-21 11:55:06 +02:00
J. Nick Koston
605c4db142 Relocate async_get_announce_addresses from zeroconf to network (#94816) 2023-06-21 11:29:04 +02:00
Jan Bouwhuis
c47543c9dd Add current_humidity attribute to tuya (de)humidifiers (#94953)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-06-21 11:28:12 +02:00
Joost Lekkerkerker
30453f6982 Add entity translations for Adguard (#94171) 2023-06-21 11:26:24 +02:00
Erik Montnemery
b254218dd6 Remove base_url configuration option from tts (#94905) 2023-06-21 11:20:33 +02:00
Joost Lekkerkerker
83c478105b Add entity translations for huisbaasje (#94116) 2023-06-21 11:18:55 +02:00
G Johansson
aec946e93a Improve description in Workday config flow (#94945) 2023-06-21 11:17:36 +02:00
epenet
60b78f4648 Add error handling to hassio issues (#94951) 2023-06-21 11:17:11 +02:00
Erik Montnemery
1d18fdf7bd Improve alarm_control_panel device trigger tests (#94956) 2023-06-21 11:11:07 +02:00
J. Nick Koston
804a8ef36a Reduce overhead to update esphome entities (#94930) 2023-06-21 11:00:21 +02:00
Guido Schmitz
933ae5198e Refactor devolo_home_network tests (#88706)
* Refactor devolo_home_network tests

* Reduce to snapshot introduction

* Simplify

* Update snapshots

* Simplify further
2023-06-21 10:21:36 +02:00
J. Nick Koston
f8bef95eb6 Reduce code in entity filter (#94882) 2023-06-21 08:37:19 +01:00
Quentame
31e9d95f66 Fix Netgear comment typo (#94927) 2023-06-21 08:23:22 +02:00
Leandro Loureiro
1e078d5868 Bump arcam_fmj lib to 1.4.0 to support Arcam ST60 (#94942)
bumping arcam_fmj lib to 1.4.0
2023-06-21 01:43:02 +02:00
Erik Montnemery
863b948e7c Correct calls to super class in RecorderPool (#94923) 2023-06-20 23:26:37 +02:00
Erik Montnemery
446a820cbb Name unnamed sensors by their device class (#94646) 2023-06-20 23:09:24 +02:00
J. Nick Koston
b857dc8d94 Bump HAP-python to 4.7.0 (#94812) 2023-06-20 23:06:26 +02:00
Jan Bouwhuis
4def901ecc Ignore empty status update for mqtt number (#94800) 2023-06-20 23:04:01 +02:00
Erik Montnemery
3e71b1daa4 Correct calls to super class in TriggerEntity (#94916) 2023-06-20 23:00:22 +02:00
Erik Montnemery
16aa4c54ec Correct calls to super class in ZHADeviceScannerEntity (#94924) 2023-06-20 22:59:13 +02:00
Erik Montnemery
3c34e18130 Correct calls to super class in ZWaveConfigParameterSensor (#94925) 2023-06-20 22:58:34 +02:00
Jan Bouwhuis
a4399a4cb6 Add device trigger for humidifier current_humidity (#94926) 2023-06-20 22:57:44 +02:00
Erik Montnemery
d2d6389742 Improve storage helper typing (#94929) 2023-06-20 22:50:10 +02:00
Jan Bouwhuis
3b8feab699 Add current_humidity to humidifiers in google_assistant (#94935) 2023-06-20 22:49:10 +02:00
Jan Bouwhuis
d6b89b6f7b Add current_humidity attribute on homekit_controller humidifier (#94937) 2023-06-20 21:46:07 +01:00
Joost Lekkerkerker
d6dc738a12 Add entity translations for AirNow (#94175)
* Add entity translations for AirNow

* Restore keys

* Restore keys
2023-06-20 22:24:51 +02:00
Joost Lekkerkerker
18d0fe994d Add entity translations for AirQ (#94280) 2023-06-20 22:19:17 +02:00
Austin Mroczek
252c0e8ad9 Fix Totalconnect BinarySensorDeviceClass logic (#94772)
* handle temperature

* test for temperature

* test for unknown
2023-06-20 22:12:11 +02:00
Erik Montnemery
6183a36fce Replace assert_lists_same with pytest_unordered in integrations t-z (#94903) 2023-06-20 20:23:49 +02:00
Erik Montnemery
eba04824a4 Replace assert_lists_same with pytest_unordered in integrations n-s (#94902) 2023-06-20 20:23:14 +02:00
Erik Montnemery
6a29ed8caa Replace assert_lists_same with pytest_unordered in integrations a-f (#94900) 2023-06-20 20:22:31 +02:00
Erik Montnemery
fd822bce56 Replace assert_lists_same with pytest_unordered in integrations h-m (#94901) 2023-06-20 20:16:25 +02:00
Jan Bouwhuis
c4d7695173 Add current_humidity attribute to xiaomi_miio humidifiers (#94934) 2023-06-20 20:15:42 +02:00
Denis Shulyaka
1d2a973289 Generic hygrostat current humidity (#94912) 2023-06-20 20:10:21 +02:00
Erik Montnemery
45616b8127 Follow redirects in generic camera (#94931) 2023-06-20 20:07:12 +02:00
Erik Montnemery
b600c2cd85 Add cloud_connected method to CloudClient (#91997)
* Add cloud_connected method to CloudClient

* Add cloud_disconnected method

* Update client.py
2023-06-20 17:15:13 +02:00
Allen Porter
50605e62bd Bump ical to 4.5.4 (#94894) 2023-06-20 07:32:03 -07:00
J. Nick Koston
3f18f515e7 Improve websocket api coverage and typing (#94891) 2023-06-20 15:21:24 +01:00
J. Nick Koston
b51dcb600e Avoid enumerating the whole state machine to find zone entities (#94866) 2023-06-20 14:48:28 +01:00
Allen Porter
30e8f806c1 Improve service response data APIs (#94819)
* Improve service response data APIs

Make the API naming more consistent, and require registration that a
service supports response data so that we can better integrate with
the UI and avoid user confusion with better error messages.

* Improve test coverage

* Add an enum for registering response values

* Assign enum values

* Convert SupportsResponse to StrEnum

* Update service call test docstrings

* Add tiny missing full stop in comment

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-06-20 06:24:31 -07:00
Erik Montnemery
4a8adae146 Teach alarm_control_panel device trigger about entity registry ids (#60977)
* Teach alarm_control_panel device trigger about entity registry ids

* Lint code

* Address review comment
2023-06-20 08:27:31 -04:00
Erik Montnemery
2bc5198390 Bump hass-nabucassa to 0.68.0 (#94910)
* Bump hass-nabucassa to 0.68.0

* Add implementation of new abstract methods
2023-06-20 13:52:21 +02:00
Erik Montnemery
609a573b55 Regenerate instance ID on error (#94898) 2023-06-20 11:16:51 +02:00
J. Nick Koston
2b1660c0f7 Dispatch when esphome static info changes (#94876) 2023-06-20 09:45:30 +02:00
Denis Shulyaka
185aaa9e07 Humidifier current humidity (#94874) 2023-06-20 09:43:33 +02:00
RenierM26
2be5bab5e1 Ezviz library bump 0.2.1.2 (#94823) 2023-06-20 08:47:34 +02:00
Thomas Schamm
3cf88ffdde Bump boschshcpy to 0.2.57 (#94686) 2023-06-20 08:40:57 +02:00
James Smith
99cbf21c57 Add homeassistant.components.text to .strict-typing (#94890) 2023-06-20 08:28:27 +02:00
Matthias Alphart
a262cd2b96 Add source address early for KNX services (#94889) 2023-06-20 08:02:13 +02:00
Mariano Faraco
5d40edcf02 Bump ha-philipsjs to 3.1.0 (#94811) 2023-06-20 06:40:58 +02:00
Álvaro Fernández Rojas
6435837061 Update aioairzone to v0.6.4 (#94873) 2023-06-19 19:23:24 -05:00
Graham Brown
cecdc3bd47 ESPHome Alarm Control Panel (#92357) 2023-06-19 19:19:17 -05:00
quthla
b1288a885d Bump yeelight to 0.7.11 (#94879)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-19 18:38:42 -05:00
J. Nick Koston
1206f2c1da Fix memory leaks in websocket api (#94780)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-19 18:27:22 -05:00
Erik Montnemery
a7d327afa2 Improve test coverage of automation extraction functions (#94878) 2023-06-19 23:05:20 +02:00
Erik Montnemery
5d138b64d9 Improve test coverage of script (#94883) 2023-06-19 22:40:49 +02:00
boozer2
51326bd8c7 Add Switchbot Indoor/Outdoor Meter (#94836)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-19 13:35:44 -05:00
Jan Bouwhuis
8b6d2fc3ce Remove unreachable template validation for imap config flow (#94862) 2023-06-19 20:20:10 +02:00
Jan Bouwhuis
ce8217acf5 Explicitly opt-in to device name in the imap integration (#94861) 2023-06-19 19:58:41 +02:00
Erik Montnemery
5303bef83e Add image entity component (#90564) 2023-06-19 17:03:48 +02:00
Erik Montnemery
43c4dec3ed Explicitly opt-in to device name in the demo integration (#94647) 2023-06-19 15:56:48 +02:00
Erik Montnemery
3ee63ba2c2 Add tests for kitchen_sink sensor platform (#94724)
* Add tests for kitchen_sink sensor platform

* Address review comments
2023-06-19 14:16:18 +02:00
Erik Montnemery
e49c2fde14 Add tests for kitchen_sink lock platform (#94723) 2023-06-19 13:24:36 +02:00
Mike Heath
d3bf52c136 Register Fully Kiosk services regardless of setup result (#88647)
* Register services at integration level

If HA is unable to connect to Fully Kiosk, the services don't get
registered. This can cause repair to create notifications saying
that the 'fully_kiosk.load_url' service is unknown.

Fixes #85444

* Validate config entry is loaded

* Refactor service invocation

Raises `HomeAssistantError` when the user provides an device id that is
not in the device registry or a device that is not a Fully Kiosk
device. If the device's config entry is not loaded, a warning is
logged.

* Update homeassistant/components/fully_kiosk/services.py

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

* Assert HomeAssistantError when integration unloaded

* Remove unused import

* Set CONFIG_SCHEMA

* Update homeassistant/components/fully_kiosk/__init__.py

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

* Add test for non fkb devices targets in service calls

* Apply suggestions from code review

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-19 13:12:04 +02:00
J. Nick Koston
a027a01535 Log a traceback when importing a component fails (#94778)
`2023-06-17 12:44:37.961 ERROR (MainThread) [homeassistant.setup] Setup failed for switchbot: Unable to import component: cannot import name DEFAULT_CIPHERS from urllib3.util.ssl_ (/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/urllib3/util/ssl_.py)` is not very helpful as it does not show which module tried to import.

adding a traceback makes it more obvious, and since ImportError is usually not something
the user can easily solve, it makes issue reports much more helpful

```
DEFAULT_CIPHERS from urllib3.util.ssl_ (/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/urllib3/util/ssl_.py)
Traceback (most recent call last):
  File "/Users/bdraco/home-assistant/homeassistant/setup.py", line 213, in _async_setup_component
    component = integration.get_component()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bdraco/home-assistant/homeassistant/loader.py", line 813, in get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/Users/bdraco/home-assistant/homeassistant/components/switchbot/__init__.py", line 5, in <module>
    import switchbot
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/switchbot/__init__.py", line 22, in <module>
    from .devices.lock import SwitchbotLock
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/switchbot/devices/lock.py", line 12, in <module>
    import boto3
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/boto3/__init__.py", line 16, in <module>
    from boto3.session import Session
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/boto3/session.py", line 17, in <module>
    import botocore.session
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/botocore/session.py", line 29, in <module>
    import botocore.credentials
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/botocore/credentials.py", line 34, in <module>
    from botocore.config import Config
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/botocore/config.py", line 16, in <module>
    from botocore.endpoint import DEFAULT_TIMEOUT, MAX_POOL_CONNECTIONS
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/botocore/endpoint.py", line 22, in <module>
    from botocore.awsrequest import create_request_object
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/botocore/awsrequest.py", line 24, in <module>
    import botocore.utils
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/botocore/utils.py", line 32, in <module>
    import botocore.httpsession
  File "/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/botocore/httpsession.py", line 10, in <module>
    from urllib3.util.ssl_ import (
ImportError: cannot import name DEFAULT_CIPHERS from urllib3.util.ssl_ (/Users/bdraco/home-assistant/venv/lib/python3.11/site-packages/urllib3/util/ssl_.py)
```
2023-06-19 13:10:39 +02:00
Maciej Bieniek
c7e460ccab Return None as BraviaTV media_player/remote entity name (#94804) 2023-06-19 12:04:50 +02:00
Maciej Bieniek
546139e491 Return None as Accuweather weather entity name (#94803) 2023-06-19 12:04:25 +02:00
J. Nick Koston
80d4f90e70 Add missing abort string to apple_tv (#94818) 2023-06-19 11:51:39 +02:00
Joost Lekkerkerker
a7f3bde3ac Add Twitch codeowner (#94851) 2023-06-19 11:51:04 +02:00
Erik Montnemery
17797c04c3 Explicitly opt-in to device name in the uptime integration (#94846) 2023-06-19 11:47:54 +02:00
Erik Montnemery
c7d636a371 Explicitly opt-in to device name in the season integration (#94845) 2023-06-19 11:47:44 +02:00
Erik Montnemery
76a5e6d7ce Explicitly opt-in to device name in the cpuspeed integration (#94844) 2023-06-19 11:47:29 +02:00
Erik Montnemery
e6a7ff97c8 Explicitly opt-in to device name in the cast integration (#94847) 2023-06-19 11:04:59 +02:00
J. Nick Koston
24add59d15 Bump zeroconf to 0.69.0 (#94828)
changelog: https://github.com/python-zeroconf/python-zeroconf/compare/0.68.0...0.69.0
2023-06-19 07:39:03 +02:00
Maciej Bieniek
15ddf69c6a Bump Shelly backend library to version 5.4.0 (#94829)
Bump aioshelly to version 5.4.0
2023-06-19 00:10:29 +02:00
Ernst Klamer
13a217ad89 Bump bthome to 2.12.0 (#94822) 2023-06-18 15:06:09 -05:00
J. Nick Koston
5834d70037 Bump zeroconf to 0.68.0 (#94786) 2023-06-18 09:33:42 -05:00
starkillerOG
ee7f44b3da Bump reolink-aio to 0.7.1 (#94761) 2023-06-18 13:13:21 +02:00
Richard Kroegel
52f49fc32d bmw_conected_drive: Allow WASHING_FLUID in condition based service (#94762)
Allow WASHING_FLUID
2023-06-18 09:19:31 +02:00
Joost Lekkerkerker
9f83e4b2de Make YouTube select lower quality thumbnails (#94652)
* Make YouTube select lower quality thumbnails

* Make YouTube select lower quality thumbnails

* Make YouTube select lower quality thumbnails

* Make YouTube select lower quality thumbnails

* Add tests

* Add tests

* Add tests

* Add tests

* Add tests
2023-06-17 21:59:06 -04:00
Eric Severance
7f7b7aee6d pyWeMo serialnumber is deprecated, use serial_number (#94791) 2023-06-17 20:59:19 -04:00
Ian Foster
0513117a11 Add hub to keyboard_remote manifest (#94788)
added hub to keyboard_remote manifest
2023-06-17 23:07:18 +02:00
J. Nick Koston
be638d3772 Bump recommended esphome version for bluetooth to 2023.6.0 (#94773)
2023.6.0 is needed for #94138 to work
2023-06-17 16:23:33 -04:00
J. Nick Koston
b5e1d35e18 Bump cryptography to 41.0.1 and PyOpenSSL to 23.2.0 (#94777)
changelog: https://cryptography.io/en/latest/changelog/
changelog: https://www.pyopenssl.org/en/latest/changelog.html
2023-06-17 16:23:06 -04:00
disforw
71e8ee52e5 Fix QNAP Sensor Entity Descriptions (#94749) 2023-06-17 16:06:28 +02:00
Allen Porter
c4284c07b6 Allow scripts to capture service response data in variables (#94757)
* Allow scripts service actions to save return values

* Simplify script service response data

* Rename result_variable to response_variable based on feedback
2023-06-16 22:59:44 -04:00
Erik Montnemery
4f669b326f Fix typo in tts tests (#94725) 2023-06-16 21:08:14 -04:00
J. Nick Koston
68cf796be8 Speed up entity service calls (#94731)
* Speed up entity service calls

- Avoid permissions check if the caller is an admin
- Use set intersection instead of linear search of entity platforms to find entities

* tweak

* fix light test to not use an admin user
2023-06-16 21:07:57 -04:00
Michał Modzelewski
3778e1cd77 Support launching app deep links in apple_tv integration (#94705) 2023-06-16 13:05:46 -05:00
Jan Čermák
d7755a92c3 Fix warning from rapt_ble caused by payload version 2 (#94718) 2023-06-16 12:12:52 -05:00
Allen Porter
84c66b3cad Add support for services to return data (#94401)
* Add support for service calls with resopnse data.

Update the service calls to allow returning responses with data,
with an initial use case supporting basic service calls usable
within script.

* Revert enttiy platform/component changes

* Remove unnecessary comma diff

* Revert additional unnecessary changes

* Simplify service call

* Simplify and fix typing and revert whitespace

* Clarify typing intent

* Revert more entity service calls

* Revert additional entity service changes

* Set blocking=True for group notify service call

* Revert unnecessary changes

* Reverting more whitespace changes

* Revert more service changes

* Add test coverage for None return case

* Add parameter to service calls indicating return values were requested

* Update tests/test_core.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Add additional service call tests

* Update test comment

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-06-16 12:43:35 -04:00
Allen Porter
12129e9d21 Update service call return values and error handling (#94657)
* Update return signature of service calls

* Add timeout error handling in websocket api for service calls

* Update recorder tests to remove assertion on service call

* Remove timeout behavior and update callers that depend on it today

* Fix tests

* Add missing else

* await coro directly

* Fix more tests

* Update the intent task to use wait instead of timeout

* Remove script service call limits and limit constants

* Update tests that depend on service call limits

* Use wait instead of wait_for and add test

* Update homeassistant/helpers/intent.py

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

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-16 07:01:40 -07:00
Erik Montnemery
950b25bf42 Remove unnecessary assert from Entity (#94711) 2023-06-16 14:07:25 +02:00
Erik Montnemery
92bba4d7be Fix typo in binary_sensor tests (#94712) 2023-06-16 13:57:42 +02:00
Matthias Alphart
0ac50b4933 Update xknxproject to 3.2.0: support ETS 4 project files (#94692)
Update xknxproject to 3.2.0
2023-06-16 10:16:31 +02:00
Tom Harris
ea0e1c54d6 Handle Insteon events correctly (#94549)
Make events generalized
2023-06-16 09:35:44 +02:00
Raman Gupta
934e1a1603 Fix zwave_js trigger event reattach logic (#94702) 2023-06-16 09:35:29 +02:00
Alistair Tudor
843a15b1bb Fix unit for Habitica text sensors (#94550) 2023-06-16 09:33:02 +02:00
Joost Lekkerkerker
4eefbfd4f2 Add strings for YouTube reauthentication (#94655) 2023-06-16 09:10:55 +02:00
G Johansson
72c1273d25 Fix Command Line update twice issue (#94672)
Command Line update twice issue
2023-06-16 09:08:51 +02:00
Franck Nijhof
be05a749c5 Add preheating HVAC action to climate (#94677)
* Add preheating HVAC action to climate

* Fix MQTT tests
2023-06-15 22:16:12 -04:00
J. Nick Koston
26be0fab78 Fix debouncer not scheduling timer when wrapped function raises (#94689)
* Fix debouncer not scheduling timer when callback function raises

* test coro as well

* preen
2023-06-15 22:15:49 -04:00
J. Nick Koston
34b725bb99 Debounce discoveries to improve event loop stability at the started event (#94690)
* Debounce discoveries to improve event loop stability at the started event

The first one is immediate and anything that fires within the next
second will be debounced to only happen once every second

* fix mock
2023-06-15 22:15:07 -04:00
J. Nick Koston
7e3510800d Bump bluetooth-data-tools to 1.2.0 (#94696)
changelog: https://github.com/Bluetooth-Devices/bluetooth-data-tools/compare/v1.1.0...v1.2.0

benchmark (0.4.0) currently in 2023.6.x: Parsing 100000 bluetooth messages took 8.928823958034627 seconds
benchmark (1.2.0) this PR: Parsing 100000 bluetooth messages took 1.6808899159659632 seconds
2023-06-15 22:11:14 -04:00
Dirk Sarodnick
3440c1615d Fix bluetooth tracker asyncio usage (#94695)
* fix for asyncio usage

fixes the error "Passing coroutines is forbidden, use tasks explicitly", caused by passing an async function into asyncio.wait directly instead of creating a task for it.

* removes unnecessary default param

* corrects formatting for black
2023-06-15 22:10:04 -04:00
J. Nick Koston
45bf1235d8 Remove airplay filter now that apple tv supports airplay 2 (#94693)
remove airplay filter
2023-06-15 22:09:10 -04:00
J. Nick Koston
298f763f12 Drop codeowner for myq (#94699)
All of my garage doors have been migrated to using
https://esphome-ratgdo.github.io/esphome-ratgdo/

All of my gates have been migrated to using a
KC868-A4 board https://www.kincony.com/kc868-a4-digital-input-trigger-relay-output-esphome.html

I no longer use myq in production as there is now a
viable esphome replacement every place I was using
myq
2023-06-15 21:15:33 -04:00
Jan Bouwhuis
5e55f83cbc Correct imap sensor measurement class and add suggested precision (#94060)
* Fix imap sensor measurement class and precision

* Test measurement class is set correctly

* Remove unrelated changes

* Move EntityDescription to module level
2023-06-16 00:44:58 +02:00
Michał Modzelewski
b104680c6d Bump pyatv to 0.13.0 (#94683) 2023-06-15 11:57:36 -10:00
Franck Nijhof
21bdcd6b63 Remove str as a valid HVACMode & HVACAction type (#94644)
* Remove str as a valid HAVCMode type

* Adjust pylint plugin

* Also remove str from hvac_action property method
2023-06-15 20:16:17 +02:00
Franck Nijhof
324bd9a97a Fix HAVCAction typing in Atag (#94656) 2023-06-15 18:43:56 +02:00
Franck Nijhof
81d46fe2b2 Fix HAVCAction typing in Balboa Spa Client (#94658) 2023-06-15 18:43:32 +02:00
Franck Nijhof
68f87fe42a Fix HAVCAction typing in Genius Hub (#94659) 2023-06-15 18:43:11 +02:00
Franck Nijhof
7e5a9ea6c7 Fix HAVCAction typing in Overkiz (#94660) 2023-06-15 18:42:46 +02:00
Kim Frellsen
562f0d3c52 Fortios device tracker updates (#92331)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-06-15 15:34:14 +02:00
Franck Nijhof
a7955e4458 Fix HAVCMode typing in Elk-M1 Control (#94639) 2023-06-15 15:27:49 +02:00
Franck Nijhof
d78429ad95 Use HAVCMode enum in Atag climate (#94634) 2023-06-15 14:14:25 +02:00
Franck Nijhof
204833b745 Fix HAVCMode typing in Rheem EcoNet (#94637) 2023-06-15 14:13:59 +02:00
Franck Nijhof
998a45879e Use HAVCMode enum in BSB-Lan climate (#94638) 2023-06-15 14:13:20 +02:00
Franck Nijhof
908f3386e7 Fix HAVCMode typing in ESPHome (#94630) 2023-06-15 14:12:11 +02:00
Franck Nijhof
6f106e6505 Fix HAVCMode typing in AVM FRITZ!SmartHome (#94642) 2023-06-15 14:11:18 +02:00
Franck Nijhof
e899cb3caa Fix HAVCMode typing in Genius Hub (#94640) 2023-06-15 14:08:38 +02:00
Franck Nijhof
b1abe6812b Fix HAVCMode typing in Honeywell Total Connect Comfort (#94636) 2023-06-15 14:07:41 +02:00
Franck Nijhof
e49f1b002f Fix HAVCMode typing in Fibaro (#94641) 2023-06-15 14:07:08 +02:00
Franck Nijhof
1d3a7512d8 Fix HAVCMode typing in Overkiz (#94632) 2023-06-15 14:06:06 +02:00
Franck Nijhof
886dea59c3 Fix HAVCMode typing in Tuya (#94631) 2023-06-15 14:05:08 +02:00
Franck Nijhof
6c4fe9fc3b Fix HAVCMode typing in Intellifire (#94633) 2023-06-15 14:04:38 +02:00
Dominik
64d914d56d Bump minimum typing_extensions to 4.6.3 (#94587) 2023-06-15 12:30:52 +02:00
Erik Montnemery
334dacc322 Change Entity.name default to UNDEFINED (#94574)
* Change Entity.name default to UNDEFINED

* Update typing

* Update Pylint plugin

* Update TTS test
2023-06-15 11:09:53 +02:00
J. Nick Koston
d369d679c7 Fix ESPHome entries reloading after startup when dashboard is in use (#94362) 2023-06-14 21:16:39 -10:00
epenet
580b09d0f2 Refactor XML parsing in rest (#94268)
* Refactor XML parsing in rest

* Adjust caplog check

* Adjust

* Rename

* Simplify
2023-06-15 09:15:25 +02:00
Paulus Schoutsen
e5c5790768 2023.6.2 (#94621) 2023-06-15 00:19:30 -04:00
Aidan Timson
61d260e5fe Add CPU Power to System Bridge (#80781)
* Add CPU Power to System Bridge

* Rename

* Update homeassistant/components/system_bridge/sensor.py

Co-authored-by: Aarni Koskela <akx@iki.fi>

* Fix unit

* Add suggested_display_precision=2

---------

Co-authored-by: Aarni Koskela <akx@iki.fi>
2023-06-14 21:47:50 -04:00
J. Nick Koston
2a5ffa9a5b Fix timestamps for bluetooth scanners that bundle advertisements (#94511)
#94138 added support for raw/bundled advertisements. We should use the
same monotonic time for all advertisements in the bundle if not time
is passed, or calculate the timestamp and pass it if its known
2023-06-14 21:47:00 -04:00
puddly
22dfa8797f Bump ZHA dependencies (#93989)
* Make `find_entity_id` synchronous

* Remove `tries`

* Use new `attribute_updated` event signature

* Validate attributes before creating entities

* Avoid swallowing exceptions when opening covers

* Bump ZHA dependencies

* Add a matcher for Sinope water leak sensors using a non-standard ZCL attribute

* Ensure handler matching is strict, not multi

* Add type annotations for newly-updated functions
2023-06-14 21:42:31 -04:00
J. Nick Koston
584967a35a Avoid double call to self.suggested_unit_of_measurement in sensor unit_of_measurement (#94582) 2023-06-14 21:33:05 -04:00
J. Nick Koston
e0ae7a31fe Remove _raw from zeroconf properties (#94615)
* Remove _raw from zeroconf properties

This was added in #31059 but it appears it was never used.

To preserve backwards compatibility, properties are still decoded
but utf-8 errors are replaced instead of dropped

* Remove _raw from zeroconf properties

This was added in #31059 but it appears it was never used.

To preserve backwards compatibility, properties are still decoded
but utf-8 errors are replaced instead of dropped
2023-06-14 21:31:52 -04:00
Paulus Schoutsen
905bdd0dd5 Bumped version to 2023.6.2 2023-06-14 21:18:40 -04:00
Erik Montnemery
9cbcfca2cd Improve multipan debug logging (#94580) 2023-06-14 21:18:35 -04:00
Chris Talkington
e6b8e4fd48 Fix failed recovery in ipp (#94573) 2023-06-14 21:18:34 -04:00
Chris Talkington
8f437c5833 Fix failed recovery in roku (#94572) 2023-06-14 21:18:33 -04:00
Ian Foster
d28d909114 Fix keyboard_remote for python 3.11 (#94570)
* started work to update keyboard_remote to work with python 3.11

* updated function names

* all checks pass

* fixed asyncio for python 3.11

* cleanup

* Update homeassistant/components/keyboard_remote/__init__.py

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

* Update __init__.py

added:
from __future__ import annotations

* Fix typing

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-14 21:18:32 -04:00
Maciej Bieniek
f67577ebe0 Catch InvalidAuthError in shutdown() method for Shelly gen2 devices (#94563)
* Catch InvalidAuthError in shutdown() method

* Add test

* Revert unwanted change in tests
2023-06-14 21:18:31 -04:00
Franck Nijhof
70d33129d4 Update Home Assistant base image to 2023.06.0 (#94556) 2023-06-14 21:18:29 -04:00
Aaron Bach
a63ce8100e Bump regenmaschine to 2023.06.0 (#94554) 2023-06-14 21:18:28 -04:00
J. Nick Koston
d557c6e43e Bump yalexs-ble to 2.1.18 (#94547) 2023-06-14 21:18:27 -04:00
Raman Gupta
fd0404bb4a Fix entity and device selector TypedDict's (#94510) 2023-06-14 21:18:26 -04:00
Chris Phillips
576cf52573 Bump russound_rio to 1.0.0 (#94500) 2023-06-14 21:17:51 -04:00
mover85
e83f0bb7a5 Revert "Bump pydaikin 2.9.1 (#93635)" (#94469)
Revert to pydaikin 2.9.0
2023-06-14 21:17:08 -04:00
Raman Gupta
fa8e952324 Set default value for endpoint in zwave device automations (#94445)
* Set default value for endpoint in zwave device automations

* add test case
2023-06-14 21:17:07 -04:00
G Johansson
25a4679266 Fix reload service in Command Line (#94436)
* Fix reload in Command Line

* Add read new yaml
2023-06-14 21:17:06 -04:00
G Johansson
f5aa4f5866 Fix manual update for Command Line (#94433)
Manual update command line
2023-06-14 21:17:04 -04:00
Yuxin Wang
0083649e43 Add unit inference for Amps and VA in APCUPSD integration (#94431)
* Add unit inference for Amps and VA

* Rename `init_integration` to `async_init_integration` for better consistency with HA naming style
2023-06-14 21:17:03 -04:00
Sander
2505de35c9 Fix: Xiaomi Miio Fan, delay off countdown unit conversion (#94428) 2023-06-14 21:17:02 -04:00
Christopher Bailey
238eebb0b6 Bump unifiprotect to 4.10.3 (#94416)
* Bump unifiprotect to 4.10.3

* Reqs
2023-06-14 21:17:01 -04:00
Matthias Alphart
4cb30e69ac Update knx-frontend to 2023.6.9.195839 (#94404) 2023-06-14 21:16:19 -04:00
Joost Lekkerkerker
ac00977e57 Abort youtube configuration if user has no channel (#94402)
* Abort configuration if user has no channel

* Clean up

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-14 21:15:21 -04:00
jasonkuster
b2db849798 Fix ZHA binding api to actually return responses (#94388) 2023-06-14 21:15:20 -04:00
Raman Gupta
2c7a176580 Re-add event listeners after Z-Wave server disconnection (#94383)
* Re-add event listeners after Z-Wave server disconnection

* switch order

* Add tests
2023-06-14 21:15:19 -04:00
Matthias Alphart
4dbc408696 Update xknxproject to 3.1.1 (#94375) 2023-06-14 21:14:42 -04:00
Sebastian Muszynski
582fd11a70 Fix deprecated asyncio.wait use with coroutines (#94371) 2023-06-14 21:13:25 -04:00
Jan Bouwhuis
96cb5ff8b0 Fix dep noaa-coops for noaa_tides (#94370)
Bump noaa-coops to 0.1.9
2023-06-14 21:13:23 -04:00
Jafar Atili
6029e23ab7 fix: electrasmart - cast temperature to int in set_temperature (#94368)
fix: cast temperature to int
2023-06-14 21:13:22 -04:00
Jonathan Keljo
3434d74993 Upgrade sisyphus-control to 3.1.3 (#94310) 2023-06-14 21:13:21 -04:00
Nathan Spencer
e091793b6c Bump pylitterbot to 2023.4.2 (#94301) 2023-06-14 21:13:20 -04:00
Glenn Waters
9c8444da0e Bump elkm1-lib to 2.2.5 (#94296)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-14 21:13:19 -04:00
Tom Harris
427f0f4bee Fix issue with Insteon linked devices maintaining current state (#94286)
* Bump pyinsteon

* Update tests
2023-06-14 21:13:18 -04:00
FFT
95528f875e Change pyoppleio to pyoppleio-legacy (#88050)
* Change pyoppleio to pyoppleio-310 (#75268)

* [m] change opple component's dependency to a new working one
2023-06-14 21:13:17 -04:00
Maciej Bieniek
7b3f100efb Catch InvalidAuthError in shutdown() method for Shelly gen2 devices (#94563)
* Catch InvalidAuthError in shutdown() method

* Add test

* Revert unwanted change in tests
2023-06-15 00:00:21 +03:00
disforw
a79e37c240 Add coordinator to QNAP (#94413)
* Create coordinator.py

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Update homeassistant/components/qnap/coordinator.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/coordinator.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/coordinator.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/coordinator.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/coordinator.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/coordinator.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Add import

* Update coordinator.py

* Update coordinator.py

* Add platformnotready

* Walrus

* Update sensor.py

* Undo walres

CI didnt like it

* Update coordinator.py black fix

* Update sensor.py fix black

* Update sensor.py fix ruff

* Update coordinator.py fix lint

* Update sensor.py fix ruff

* Update homeassistant/components/qnap/coordinator.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update sensor.py

* Update coordinator.py

* Update coordinator.py

* Update sensor.py

* Update homeassistant/components/qnap/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update sensor.py

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-06-14 22:42:49 +02:00
J. Nick Koston
b149fffa08 Bump bluetooth-data-tools to 1.1.0 (#94610)
Bume bluetooth-data-tools to 1.1.0

performance improvements

https://github.com/Bluetooth-Devices/bluetooth-data-tools/compare/v1.0.0...v1.1.0
2023-06-14 22:25:26 +02:00
Ian Foster
e998320053 Fix keyboard_remote for python 3.11 (#94570)
* started work to update keyboard_remote to work with python 3.11

* updated function names

* all checks pass

* fixed asyncio for python 3.11

* cleanup

* Update homeassistant/components/keyboard_remote/__init__.py

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

* Update __init__.py

added:
from __future__ import annotations

* Fix typing

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-14 22:06:55 +02:00
Erik Montnemery
e539344d22 Set has_entity_name in mill (#94605) 2023-06-14 21:45:14 +02:00
Erik Montnemery
cc53e4e6c1 Set has_entity_name in kodi (#94604)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-14 21:44:17 +02:00
Erik Montnemery
fa9c31d3db Set has_entity_name in freedompro (#94603)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-14 21:42:51 +02:00
Erik Montnemery
c48afebbfc Set has_entity_name in electrasmart (#94602)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-14 21:41:53 +02:00
Erik Montnemery
fc068f878b Minor adjustment in sharkiq, webostv, ws66i (#94611) 2023-06-14 21:41:32 +02:00
Michael Hansen
5c3ec8774d Fix async_timeout deprecation warning (#94594)
* Fix async_timeout deprecation warning

* Combine async with
2023-06-14 14:26:24 -05:00
Erik Montnemery
7fbeac9bbe Set has_entity_name in webostv (#94607)
* Set has_entity_name in webostv

* Fix log message
2023-06-14 22:11:09 +03:00
Erik Montnemery
f68ed8b7a0 Always setup demo platforms with device support from config entry (#94601)
* Always setup demo platforms with device support from config entry

* Update tests depending on the demo integration
2023-06-14 21:03:07 +02:00
Erik Montnemery
c5fccffbb3 Set has_entity_name in sharkiq (#94606) 2023-06-14 21:02:00 +02:00
Erik Montnemery
3424e927cb Set has_entity_name in ws66i (#94608) 2023-06-14 20:49:23 +02:00
J. Nick Koston
a0c023d5cb Reduce overhead to lookup items in the entity and device registry (#94568) 2023-06-14 20:47:18 +02:00
Niclas Kühnapfel
de62082605 Update solax to 0.3.2 (#94545)
* solax: update to 0.3.2

* Update solax dependencies
2023-06-14 16:52:43 +02:00
Erik Montnemery
9a3077d64a Always setup demo platforms with device support from config entry (#94586)
* Always setup demo platforms with device support from config entry

* Adjust test fixutres

* Update tests depending on the demo integration
2023-06-14 16:50:35 +02:00
Erik Montnemery
1b8c72e644 Remove legacy STT provider from the demo integration (#94585) 2023-06-14 14:55:50 +02:00
Erik Montnemery
e5b2801f5b Fix ZHA tests (#94588) 2023-06-14 14:21:34 +02:00
dupondje
4ac2dd3de7 Bump python devcontainer (#94540) 2023-06-14 11:38:47 +02:00
Erik Montnemery
bd156bb129 Improve multipan debug logging (#94580) 2023-06-14 10:26:54 +02:00
Chris Talkington
6a75f69e0f Fix failed recovery in ipp (#94573) 2023-06-13 21:07:24 -10:00
Chris Talkington
508cd7ef7e Fix failed recovery in roku (#94572) 2023-06-13 21:07:03 -10:00
Franck Nijhof
66400fca0d Update Home Assistant base image to 2023.06.0 (#94556) 2023-06-13 22:27:14 +02:00
Franck Nijhof
d5be77b53d Update sentry-sdk to 1.25.1 (#94374) 2023-06-13 22:10:56 +02:00
Aaron Bach
08262f480b Bump regenmaschine to 2023.06.0 (#94554) 2023-06-13 21:37:56 +02:00
Chris Phillips
ddf004d5c7 Bump russound_rio to 1.0.0 (#94500) 2023-06-13 21:37:30 +02:00
Erik Montnemery
2406b235b4 Name unnamed binary sensors by their device class (#92940)
* Name unnamed binary sensors by their device class

* Update type annotations

* Fix loading of entity component translations

* Add test

* Update integrations

* Set abode and rfxtrx binary_sensor name to None

* Revert changes in homekit_controller
2023-06-13 19:48:54 +02:00
J. Nick Koston
223394eaee Bump bluetooth-data-tools to 1.0.0 (#94145) 2023-06-13 06:42:10 -10:00
J. Nick Koston
985fb3cd5d Bump yalexs-ble to 2.1.18 (#94547) 2023-06-13 18:32:43 +02:00
Yuxin Wang
b1bdd92383 Add unit inference for Amps and VA in APCUPSD integration (#94431)
* Add unit inference for Amps and VA

* Rename `init_integration` to `async_init_integration` for better consistency with HA naming style
2023-06-13 16:38:56 +02:00
Nathan Spencer
47995fc274 Bump pylitterbot to 2023.4.2 (#94301) 2023-06-13 11:51:46 +02:00
Joakim Sørensen
889f3c36fc Adjust default name in backup service calls to match documentation (#94468) 2023-06-13 11:41:53 +02:00
Erik Montnemery
771a73c034 Add missing callback decorator to event helpers (#94483) 2023-06-13 11:16:43 +02:00
Raman Gupta
aab58ad89c Fix entity and device selector TypedDict's (#94510) 2023-06-13 10:52:55 +02:00
J. Nick Koston
0d1bcd8a8f Bump httpcore to 0.17.2 (#94515) 2023-06-13 10:38:51 +02:00
J. Nick Koston
8a1ca0a3f5 Bump zeroconf to 0.66.0 (#94512) 2023-06-13 10:38:26 +02:00
J. Nick Koston
d2fa6435da Bump lru-dict to 1.2.0 (#94513) 2023-06-13 10:37:59 +02:00
J. Nick Koston
829ca7c567 Bump orjson to 3.9.1 (#94514) 2023-06-13 10:36:56 +02:00
J. Nick Koston
e8c87874b3 Bump anyio to 3.7.0 (#94516) 2023-06-13 10:36:25 +02:00
dependabot[bot]
fd9b273f46 Bump dessant/lock-threads from 4.0.0 to 4.0.1 (#94523)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 10:33:21 +02:00
FFT
5d8a50baf0 Change pyoppleio to pyoppleio-legacy (#88050)
* Change pyoppleio to pyoppleio-310 (#75268)

* [m] change opple component's dependency to a new working one
2023-06-13 08:46:58 +02:00
Raman Gupta
f3ca3a8ee0 Set default value for endpoint in zwave device automations (#94445)
* Set default value for endpoint in zwave device automations

* add test case
2023-06-12 21:34:09 -04:00
Allen Porter
8e08338118 Bump google-nest-sdm to 2.2.5 (#94398) 2023-06-12 21:58:19 +02:00
G Johansson
bd74f03d0b Fix reload service in Command Line (#94436)
* Fix reload in Command Line

* Add read new yaml
2023-06-12 21:51:57 +02:00
G Johansson
f931cc3d1c Fix manual update for Command Line (#94433)
Manual update command line
2023-06-12 21:50:23 +02:00
Erik Montnemery
af6dac8584 Remove unnecessary condition from edl21 sensor (#94493) 2023-06-12 21:48:49 +02:00
Erik Montnemery
d51982f12f Add missing assert to test_async_remove_ignores_in_flight_polling (#94487) 2023-06-12 21:48:12 +02:00
Jan Bouwhuis
82b9a31ea7 Improve logging of mqtt discovery message errors (#94491)
* Improve logging on mqtt discovery message errors

* Create shared helper

* Apply suggestion

* Catch base class vol.Invalid
2023-06-12 21:28:28 +02:00
mover85
eb0485ebb0 Revert "Bump pydaikin 2.9.1 (#93635)" (#94469)
Revert to pydaikin 2.9.0
2023-06-12 20:58:20 +02:00
Luke
5cdb65100f Add Roborock DnD switch (#94474)
* add Dnd switch

* add dnd test

* fix typing
2023-06-12 20:30:15 +02:00
c0ffeeca7
854c709332 Update OwnTracks UI strings to reflect OwnTracks UI (#94476)
OwnTracks: update UI strings to reflect OwnTracks UI
2023-06-12 20:19:46 +02:00
Jan Bouwhuis
c756c7aceb Cleanup help_setup_helper in common mqtt tests (#94482) 2023-06-12 20:18:05 +02:00
jasonkuster
a25f3c9b27 Fix ZHA binding api to actually return responses (#94388) 2023-06-12 13:07:42 -04:00
Erik Montnemery
86f2aa84e5 Fix flaky ESPHome test fixture (#94465) 2023-06-12 16:59:11 +02:00
dependabot[bot]
d84b8a0288 Bump home-assistant/builder from 2023.03.0 to 2023.06.0 (#94453)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 12:14:32 +02:00
Franck Nijhof
eb2b1d2970 Add diagnostic support to Rituals Perfume Genie (#94373) 2023-06-12 11:33:47 +02:00
G Johansson
ce02261303 Remove Brottsplatskartan YAML configuration (#94101)
Remove platform yaml
2023-06-12 11:28:21 +02:00
G Johansson
f2cf92050a Remove Workday YAML configuration (#94102)
Remove platform yaml from workday
2023-06-12 11:27:37 +02:00
dependabot[bot]
4d3db038d6 Bump actions/checkout from 3.5.2 to 3.5.3 (#94452)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.5.2...v3.5.3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 10:42:40 +02:00
Erik Montnemery
f17773233b Add check for integration config schema to hassfest (#93587)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-06-12 10:26:02 +02:00
Sander
c79b9d0b07 Fix: Xiaomi Miio Fan, delay off countdown unit conversion (#94428) 2023-06-12 08:25:09 +02:00
Jan Bouwhuis
3adea14ddb Use TemplateSelector on imap custom imap_content event template config option (#94429)
Use TemplateSelector for imap custom template
2023-06-12 06:30:23 +02:00
Glenn Waters
acaa9ef9de Bump elkm1-lib to 2.2.5 (#94296)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-11 15:25:01 -10:00
Erik Montnemery
0fd28c91a8 Remove overridden entity_id property from WirelessTagSensor (#94339) 2023-06-11 17:29:53 -04:00
Sebastian Muszynski
2d62735b0d Fix deprecated asyncio.wait use with coroutines (#94371) 2023-06-11 20:01:41 +02:00
Christopher Bailey
fd43687833 Bump unifiprotect to 4.10.3 (#94416)
* Bump unifiprotect to 4.10.3

* Reqs
2023-06-11 10:22:12 -04:00
Tom Harris
3eedbe92ad Fix issue with Insteon linked devices maintaining current state (#94286)
* Bump pyinsteon

* Update tests
2023-06-11 10:21:33 -04:00
Jan Bouwhuis
3cf2c81baa Fix dep noaa-coops for noaa_tides (#94370)
Bump noaa-coops to 0.1.9
2023-06-11 10:21:06 -04:00
Jan-Philipp Benecke
7d0f5733c2 Improve the code quality of the Discovergy integration (#94165)
* Remove option flow, refactor and improve the code quality after review in PR #54280

* Remove coordinator.py from coverage report

* Some minor improvements for unit tests

* Remove _LOGGER

* Use pytest.fixture and some more improvments

* Add back empty __init__

* Fix docstring

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-11 12:51:43 +02:00
Joost Lekkerkerker
a8dd2d520a Abort youtube configuration if user has no channel (#94402)
* Abort configuration if user has no channel

* Clean up

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-11 12:30:38 +02:00
J. Nick Koston
9e666ae0c0 Reduce in progress flow matching overhead (#94403)
* Reduce config flow matching overhead

Much of the config flow matching is happening on the context data
after converting via a series of functions. Avoid the conversions
by passing the context matcher deeper into the stack so only
relvant entries need to be processed.

The goal is to reduce the overhead and reduce the chance
the event loop falls behind at the started event when
all the discoveries are processed

* Reduce config flow matching overhead

Much of the config flow matching is happening on the context data
after converting via a series of functions. Avoid the conversions
by passing the context matcher deeper into the stack so only
relvant entries need to be processed.

The goal is to reduce the overhead and reduce the chance
the event loop falls behind at the started event when
all the discoveries are processed

* Reduce config flow matching overhead

Much of the config flow matching is happening on the context data
after converting via a series of functions. Avoid the conversions
by passing the context matcher deeper into the stack so only
relvant entries need to be processed.

The goal is to reduce the overhead and reduce the chance
the event loop falls behind at the started event when
all the discoveries are processed

* augment cover
2023-06-11 10:41:38 +02:00
Raman Gupta
41d8ba3397 Re-add event listeners after Z-Wave server disconnection (#94383)
* Re-add event listeners after Z-Wave server disconnection

* switch order

* Add tests
2023-06-11 08:35:52 +02:00
Luke
eab024992e Add Cleaning area sensors to Roborock (#94200)
add clean area sensor
2023-06-10 20:31:34 -04:00
Marc Mueller
3b08d5f0c3 Improve renson typing (#94390) 2023-06-10 20:28:32 -04:00
Matthias Alphart
b45659eb84 Update knx-frontend to 2023.6.9.195839 (#94404) 2023-06-10 20:48:14 +02:00
J. Nick Koston
aa71c8e8f0 Reduce I/O from cert_expiry (#94399) 2023-06-10 12:53:09 -05:00
Matthias Alphart
ece5de73a4 Update xknxproject to 3.1.1 (#94375) 2023-06-10 10:41:51 +02:00
jimmyd-be
3d678f5b99 Renson integration (#56374)
* Implemented Renson integration

* -  renamed component to a better name
- Made cleaner code by splitting up files into different one
-  Fixed issues regarding getting data from library
- Added service.yaml file

* Added Renson services

* cleanup translations

* added config_flow tests

* changed config_flow, removed all services

* use SensorEntityDescription + introduced new binarySensor

* fixed config_flow test

* renamed renson_endura_delta to renson

* refactored sensors and implemented binary_sensor

* Changed some sensors to non measurement and added entity_registery_enabled_default for config sensors

* Enabled binary_sensor

* changed import to new renamed module

* Merge files into correct files + cleaned some code

* Change use of EntityDescription

* Update codeowners

* Fixed lint issues

* Fix sensor

* Create test.yml

* Update test.yml

* add github action tests

* Format json files

* Remove deprecated code

* Update homeassistant/components/renson/binary_sensor.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Use Coordinqte in Sensor

* Migrated binary sensor to use coordinate

* Removed firmwareSensor

* Add entity_catogory to binary_sensor

* Add services

* Revert "Add services"

This reverts commit 028760d8d8454ce98cf14eed0c7927d228ccd5e6.

* update requirements of Renson integration

* Add services and fan

* Fixed some issue + fixed PR comments

* Cleanup code

* Go back 2 years ago to the bare minimum for PR approval

* Refactored code and added a lot of device classes to the entities

* Fix some bugs

* Add unique Id and some device class

* Show the level value for CURRENT_LEVEL_FIELD instead of the raw data

* Remove FILTER_PRESET_FIELD for now

* Make the _attr_unique_id unique

* Changed Renson tests

* Moved Renson hass data into @dataclass

* Changed test + added files to .coveragerc

* Add device_class=SensorDeviceClass.Duration

* Fix syntax

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-10 09:21:33 +02:00
Jafar Atili
26b78d2a7a fix: electrasmart - cast temperature to int in set_temperature (#94368)
fix: cast temperature to int
2023-06-09 21:54:11 +03:00
starkillerOG
117ab4a0e5 Bump reolink-aio to 0.6.0 (#94259) 2023-06-09 17:00:07 +02:00
J. Nick Koston
fc1eab1e7e Bump sensirion-ble to 0.1.0 (#94352) 2023-06-09 09:40:54 -05:00
Erik Montnemery
59f5b8f2d6 Remove unneeded checks for Entity.platform (#94321)
* Remove unneeded checks for Entity.platform

* Update tests

* Prevent breaking integrations without an EntityComponent

* Warn when entity has no platform
2023-06-09 15:17:41 +02:00
Erik Montnemery
239e2d9820 Migrate microsoft_face to EntityComponent (#94338) 2023-06-09 13:15:35 +02:00
Jan Bouwhuis
c984604a6c Refactor some mqtt tests not the just use schema validation (#94330)
Remove help_test_validate_platform_config
2023-06-09 12:30:26 +02:00
Jan Bouwhuis
5fb41777fd Cleanup MQTT schema from previous removed options (#94110)
* Cleanup removed validator schema option of #62680

* Cleanup removed climate options and abbreviations

* Removed white_value options for mqtt light

* Remove whaite value from mqtt json light
2023-06-09 12:12:20 +02:00
Erik Montnemery
e25fbecfdc Add missing super() call to EnergyCostSensor.add_to_platform_abort (#94322) 2023-06-09 11:28:12 +02:00
Erik Montnemery
4085c4f6d8 Tweak typing of Entity.platform (#88321)
* Tweak typing of Entity.platform

* Fix mypy errors

* Fix update test

* Improve comments
2023-06-09 10:56:04 +02:00
Erik Montnemery
41022fdce4 Add comments about removing deprecated code from sky_connect config flow (#94262) 2023-06-09 10:39:52 +02:00
Erik Montnemery
5e3b632b14 Drop call to usb.get_serial_by_id from zwave_js config flow (#94279) 2023-06-09 10:04:01 +02:00
Jonathan Keljo
288708474b Upgrade sisyphus-control to 3.1.3 (#94310) 2023-06-09 09:39:14 +02:00
Sven Serlier
7e75790281 Update URL in readme (#94282) 2023-06-09 09:24:53 +02:00
Luke
dafc7a15b1 Bump Python-Roborock to 23.6 for crash fix (#94281)
* bump to 23.5

* update to 23.5
2023-06-08 18:18:42 -07:00
Franck Nijhof
c3936e6f14 Replace isort with ruff (#94302) 2023-06-08 23:43:56 +02:00
Joost Lekkerkerker
ed3d38bb17 Request steam online friends from batches (#91167)
* Request friends from batches

* Add tests

* Add tests

* Fix feedback

* Add libcall to verify request length

* Improve tests
2023-06-08 17:08:14 -04:00
Erik Montnemery
23d15850da Use addon name as title in otbr hassio flow (#87081)
* Use addon name as title in otbr hassio flow

* Address review comments
2023-06-08 23:04:12 +02:00
Joost Lekkerkerker
b3a001996d Improve coverage for LastFM (#93661)
* Improve coverage for LastFM

* Improve tests

* Improve tests
2023-06-08 16:55:16 -04:00
Ville Skyttä
ca936d0b38 Replace bandit with ruff (#93200) 2023-06-08 22:46:04 +02:00
Ville Skyttä
f7938c940c Upgrade ruff to 0.0.272 (#94290) 2023-06-08 21:53:43 +02:00
Paulus Schoutsen
a5f86bff45 2023.6.1 (#94288) 2023-06-08 14:57:37 -04:00
Paulus Schoutsen
d991970754 Bumped version to 2023.6.1 2023-06-08 13:39:33 -04:00
Tom Harris
d745b44180 Fix Insteon startup for users with X10 devices (#94277) 2023-06-08 13:39:10 -04:00
Tom Harris
602fcd6b1b Restructure Insteon start-up (#92818)
* Restructure startup

* Code review

* Further typing

* Fix circular import
2023-06-08 13:39:09 -04:00
Franck Nijhof
b39b0a960e Fix repair issue about no yaml for config entries (#94271) 2023-06-08 13:35:08 -04:00
Paulus Schoutsen
40bb796f03 Fix default value when logger used (#94269) 2023-06-08 13:28:54 -04:00
Christopher Bailey
2801ba6cad Bump unifiprotect to 4.10.2 (#94263) 2023-06-08 13:28:52 -04:00
Paul Bottein
5da0ef36ea Update frontend to 20230608.0 (#94256) 2023-06-08 13:28:51 -04:00
Joost Lekkerkerker
d861292900 Retrieve friends in an async manner in Lastfm (#94255) 2023-06-08 13:28:50 -04:00
Jc2k
a3fda43c64 Bump aiohomekit to 2.6.5 (fixes python 3.11 regression) (#94245) 2023-06-08 13:28:49 -04:00
Joost Lekkerkerker
8705a26a1a Catch exception when user has no lastfm friends (#94235) 2023-06-08 13:28:48 -04:00
jan iversen
2b1c45c28c Solve wrong return code from modbus. (#94234) 2023-06-08 13:28:47 -04:00
Jan Bouwhuis
0cf3825183 Fix imap crash on email without subject (#94230) 2023-06-08 13:28:46 -04:00
Kostas Chatzikokolakis
413e1c97d7 Bump pulsectl to 23.5.2 (#94227) 2023-06-08 13:28:45 -04:00
Joost Lekkerkerker
3b27a3aabf Bump python-opensky to 0.0.9 (#94224) 2023-06-08 13:28:44 -04:00
Joost Lekkerkerker
4509e13ceb Bump python-opensky (#93916) 2023-06-08 13:28:43 -04:00
Álvaro Fernández Rojas
33bf8c600b Update aioairzone-cloud to v0.1.8 (#94223) 2023-06-08 13:27:46 -04:00
Jan-Philipp Benecke
b508875f17 Set httpx log level to warning (#94217)
Set log level of httpx to warning
2023-06-08 13:27:45 -04:00
Allen Porter
ac963a2b6e Require pydantic 1.10.8 or higher (#94208)
* Requied pydantic 1.10.9 or higher

* Simplify constraint to 2.0

* Drop constraint by one patch release to 1.10.8 or higher

* Add package constraints to gen requirements script
2023-06-08 13:27:43 -04:00
James Connor
13029cf26f Fix ambiclimate for Python 3.11 (#94203)
Fix ambiclimate python 3.11 break
2023-06-08 13:27:42 -04:00
Paulus Schoutsen
f39a6b96ff Rename Local Media to My Media (#94201)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-08 13:27:41 -04:00
Mick Vleeshouwer
c6a17d6832 Bump pyoverkiz to 1.8.0 (#94176) 2023-06-08 13:27:40 -04:00
Joost Lekkerkerker
74c0552a12 Fix Abode unit of measurement (#94168)
Change unit of measurement to HA const
2023-06-08 13:27:38 -04:00
Justin Vanderhooft
f24b514c9a Bump melnor-bluetooth to fix a timezone issue (#94159) 2023-06-08 13:27:37 -04:00
Erik Montnemery
e1c47fdb61 Fix OTBR reset (#94157) 2023-06-08 13:27:36 -04:00
Erik Montnemery
bdc82fa50a Drop call to usb.get_serial_by_id from modem_callerid config flow (#94275) 2023-06-08 19:21:31 +02:00
Erik Montnemery
0dbdfb7e70 Drop call to usb.get_serial_by_id from velbus config flow (#94276) 2023-06-08 19:21:19 +02:00
Erik Montnemery
35ad40421b Drop call to usb.get_serial_by_id from zha config flow (#94278) 2023-06-08 19:21:08 +02:00
Tom Harris
fceef42b08 Fix Insteon startup for users with X10 devices (#94277) 2023-06-08 18:36:42 +02:00
j4n-e4t
93baf24394 Add error handling to input_select integration (#93940) 2023-06-08 12:27:23 -04:00
Erik Montnemery
c8756ba5bb Use stable USB device path in USB discovery (#94266) 2023-06-08 18:27:04 +02:00
Franck Nijhof
6db1fbf480 Fix repair issue about no yaml for config entries (#94271) 2023-06-08 18:22:34 +02:00
Paulus Schoutsen
76535d3f7d Fix default value when logger used (#94269) 2023-06-08 12:00:34 -04:00
hookedonunix
18cbc9b4c3 Add Water Heater platform to MQTT integration (#93644)
* Add Water Heater entity to MQTT

* Adding tests for Water Heater

* Remove duplicate line and unneeded var declaration

* Remove target temp range and away mode

* Move common Temperature Control conf to const

* Remove unnecessary platform schema and temp check

* Add common value template key test

* Use MqttTemperatureControl in Water Heater

* Move operation mode out of MqttTemperatureControl

* Remove unecessary attribute declaration

* Remove default min/max temp and auto init attr

* Fix mqtt water heater initial temp conversion

* Make async_set_temperature common

* Fix init temp comment

* Merge value_template_keys into get_with_templates

* Remove unnecessary operation_mode overriding

* Add async_set_temperature to water heater

* Fix docstring comments
2023-06-08 17:38:30 +02:00
Christopher Bailey
c697731657 Bump unifiprotect to 4.10.2 (#94263) 2023-06-08 11:08:52 -04:00
Franck Nijhof
395236f6cc Merge branch 'master' into dev 2023-06-08 16:32:52 +02:00
Joost Lekkerkerker
20449d1f01 Catch exception when user has no lastfm friends (#94235) 2023-06-08 16:08:18 +02:00
Paul Bottein
758eb5e510 Update frontend to 20230608.0 (#94256) 2023-06-08 15:59:56 +02:00
Kostas Chatzikokolakis
2f2504b534 Bump pulsectl to 23.5.2 (#94227) 2023-06-08 15:59:16 +02:00
jan iversen
48607d0586 Bump pymodbus to 3.3.1 (#94162) 2023-06-08 15:57:49 +02:00
Paulus Schoutsen
d2edfca2a2 Rename Local Media to My Media (#94201)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-08 15:56:49 +02:00
Joost Lekkerkerker
425c964898 Retrieve friends in an async manner in Lastfm (#94255) 2023-06-08 15:55:09 +02:00
Jc2k
77badafea1 Bump aiohomekit to 2.6.5 (fixes python 3.11 regression) (#94245) 2023-06-08 14:10:12 +01:00
Álvaro Fernández Rojas
081bc470db Update aioairzone-cloud to v0.1.8 (#94223) 2023-06-08 11:34:56 +02:00
Mick Vleeshouwer
5a90d18041 Bump pyoverkiz to 1.8.0 (#94176) 2023-06-08 11:33:35 +02:00
jan iversen
05e822b7a3 Solve wrong return code from modbus. (#94234) 2023-06-08 11:29:54 +02:00
Joost Lekkerkerker
00ecf51091 Bump python-opensky to 0.0.9 (#94224) 2023-06-08 11:13:24 +02:00
Jan Bouwhuis
7a195b5291 Fix imap crash on email without subject (#94230) 2023-06-08 11:11:12 +02:00
dependabot[bot]
08a85e35e2 Bump docker/login-action from 2.1.0 to 2.2.0 (#94221)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-08 10:58:13 +02:00
James Connor
f06ab91678 Fix ambiclimate for Python 3.11 (#94203)
Fix ambiclimate python 3.11 break
2023-06-08 09:43:30 +02:00
Allen Porter
52ba58c782 Require pydantic 1.10.8 or higher (#94208)
* Requied pydantic 1.10.9 or higher

* Simplify constraint to 2.0

* Drop constraint by one patch release to 1.10.8 or higher

* Add package constraints to gen requirements script
2023-06-08 09:41:45 +02:00
Jan-Philipp Benecke
99ee4e8a42 Set httpx log level to warning (#94217)
Set log level of httpx to warning
2023-06-08 09:39:06 +02:00
hookedonunix
85a12c37ee Sync Climate min/max temp with Google Assistant (#94143)
* Sync climate min/max temp to Google Assistant

* Improving coverage on TemperatureSettingTrait
2023-06-07 20:46:35 -04:00
Marc Mueller
a6a2b8d29f Update pydantic to 1.10.9 (#94178) 2023-06-07 20:46:01 -04:00
J. Nick Koston
88bfd94800 Add support for ESPHome raw bluetooth advertisements (#94138)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-07 18:36:22 -05:00
Jan Bouwhuis
8e9eb400bf Refactor async_set_temperature for mqtt climate (#94166) 2023-06-07 20:34:59 +02:00
Joost Lekkerkerker
7d8e412314 Fix Abode unit of measurement (#94168)
Change unit of measurement to HA const
2023-06-07 19:53:45 +02:00
Erik Montnemery
1fa2fb4639 Fix OTBR reset (#94157) 2023-06-07 18:42:40 +02:00
RenierM26
6af1beb6bf Change Ezviz detection sensitivity to update per entity (#93995)
* Split detection sensitivity updates to entity instead of coordinator.

* Detection Sensitivity entity individual poll.

* Api return None instead of "unkown" when unkown.

* Only add entity if camera supports

* Cleanup detection type

* Commit suggestions.

---------

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2023-06-07 18:36:39 +02:00
Justin Vanderhooft
d431a692e5 Bump melnor-bluetooth to fix a timezone issue (#94159) 2023-06-07 18:17:01 +02:00
Chris Xiao
05b5b30df3 Update python-qbittorrent to 0.4.3 (#94072) 2023-06-07 18:11:39 +02:00
Erik Montnemery
df138d91e6 Disable google assistant local control of climate entities (#94153) 2023-06-07 13:46:17 +02:00
Erik Montnemery
4802e7f93a Add debug logs to cloud migration (#94151) 2023-06-07 13:16:23 +02:00
Bram Kragten
68baf84144 Update frontend to 20230607.0 (#94150) 2023-06-07 12:57:37 +02:00
Christopher Bailey
7f4d62c80f Bump unifiprotect to 4.10.1 (#94141) 2023-06-07 11:15:03 +02:00
Erik Montnemery
33044bc153 Fix migration of Google Assistant cloud settings (#94148) 2023-06-07 11:14:51 +02:00
J. Nick Koston
0a67f96402 Bump ruuvitag-ble to 0.1.2 (#94144) 2023-06-07 10:18:57 +02:00
Luke
fe11cae08d Add diagnostics to Roborock (#94099)
* Add diagnostics

* Update homeassistant/components/roborock/models.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* adds snapshot

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-06-06 21:24:36 -04:00
Paulus Schoutsen
d3fca972a5 Bump waqiasync to 1.1.0 (#94136) 2023-06-06 20:55:25 -04:00
G Johansson
c60e53b43f Remove left-over issue in Honeywell Lyric (#94092) 2023-06-06 20:54:09 -04:00
G Johansson
7d7920f483 Remove leftover issue in nVent RAYCHEM SENZ (#94105)
* Remove leftover issue senz

* strings
2023-06-06 20:47:32 -04:00
G Johansson
0d0de4aa50 Remove left-over issue Simplepush (#94103)
* Remove left-over issue simplepush

* strings
2023-06-06 20:45:07 -04:00
Luke
bee428e9f6 Bump python-roborock to 23.4 (#94111)
* bump to 23.0

* bump to 23.4
2023-06-06 20:42:59 -04:00
J. Nick Koston
001da39a47 Verify persistant notifications can be dismissed by the id they are created with (#94112) 2023-06-06 20:42:11 -04:00
Joost Lekkerkerker
6ab7b0f99c Fix typo in Picnic strings (#94117) 2023-06-06 20:40:59 -04:00
J. Nick Koston
463945b86e Remove mark_read service from persistent_notification (#94122)
* Remove mark_read from persistent_notification

Nothing on the frontend uses this, and the service is not documented

There is not much point in keeping this as the notifications
are no longer stored in the state machine

* adjust

* adjust
2023-06-06 20:40:32 -04:00
Christopher Bailey
9b6a9147c7 Fix multiple smart detects firing at once for UniFi Protect (#94133)
* Fix multiple smart detects firing at once

* Tweak

* Clean up logging. Linting

* Linting
2023-06-06 20:07:21 -04:00
Shay Levy
a6bb70c5d2 Remove goalfeed integration (#94129) 2023-06-06 20:04:53 -04:00
Bram Kragten
66785bbfc7 Update frontend to 20230606.0 (#94119) 2023-06-06 20:04:22 -04:00
Marc Mueller
4c80420d2d Improve discovergy generic typing (#94131) 2023-06-06 19:47:13 -04:00
Joakim Plate
deaf910a24 Correct zha device classes for voc and pm25 (#94130)
Correct zha device classes
2023-06-06 23:03:59 +02:00
Jan-Philipp Benecke
d8ceb6463e Add new integration Discovergy (#54280)
* Add discovergy integration

* Capitalize measurement type as it is in uppercase

* Some logging and typing

* Add all-time total production power and check if meter has value before adding it

* Add tests for Discovergy and changing therefor library import

* Disable phase-specific sensor per default, set user_input as default for schema and implement some other suggestions form code review

* Removing translation, fixing import and some more review implementation

* Fixing CI issues

* Check if acces token keys are in dict the correct way

* Implement suggestions after code review

* Correcting property function

* Change state class to STATE_CLASS_TOTAL_INCREASING

* Add reauth workflow for Discovergy

* Bump pydiscovergy

* Implement code review

* Remove _meter from __init__

* Bump pydiscovergy & minor changes

* Add gas meter support

* bump pydiscovergy & error handling

* Add myself to CODEOWNERS for test directory

* Resorting CODEOWNERS

* Implement diagnostics and reduce API use

* Make homeassistant imports absolute

* Exclude diagnostics.py from coverage report

* Add sensors with different keys

* Reformatting files

* Use new naming style

* Refactoring and moving to basic auth for API authentication

* Remove device name form entity name

* Add integration type to discovergy and implement new unit of measurement

* Add system health to discovergy integration

* Use right array key when using an alternative_key & using UnitOfElectricPotential.VOLT

* Add options for precision and update interval to Discovergy

* Remove precision config option and let it handle HA

* Rename precision attribute and remove translation file

* Some formatting tweaks

* Some more tests

* Move sensor names to strings.json

* Redacting title and unique_id as it contains user email address
2023-06-06 13:44:00 -04:00
Jean-François Roy
5ab4bf218e Bump aiobafi6 to 0.8.2 (#94125) 2023-06-06 12:42:49 -05:00
puddly
b03c429db7 Revert "Increase Zigbee command retries (#93877)" (#94123) 2023-06-06 17:44:29 +02:00
Jan Bouwhuis
83b0ec5136 Freeze time on timer tests that assert on remaining time (#94078) 2023-06-06 09:18:25 -05:00
Jan Bouwhuis
0d4af6fb1e Stale doc string for mqtt light async_setup_entry (#94109) 2023-06-06 16:02:46 +02:00
G Johansson
05fbc09ef0 Remove Slack YAML configuration (#94106) 2023-06-06 16:01:40 +02:00
G Johansson
a1a20fab33 Remove leftover issue warning in SimpliSafe (#94104) 2023-06-06 08:00:59 -06:00
Paul Frank
c67f32b924 Add config flow to mystrom (#74719)
* rebase

* fixed review comments

* fix test

* Update tests

* increase test coverage

* implement some review comments

* Enhance device check for old FWs and add tests

* Reworked exception handling

* small code optimizations

* fix test

* Increase test coverage

* Update __init__.py

changed from hass.config_entries.async_setup_platforms(entry, PLATFORMS) to await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)

* Update __init__.py

remove spaces

* Bump python-mystrom to 2.2.0

* Migrate to get_device_info from python-mystrom

* Migrate to get_device_info from python-mystrom

* Update __init__.py

* update requirements_all.txt

* update config_flow

* fix tests

* Update homeassistant/components/mystrom/__init__.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Implemented review changes

* increase test coverage

* Implemented user defined title

* implemented user defined title

* Additional review comments

* fix test

* fix linter

* fix linter

* Update homeassistant/components/mystrom/models.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* fix review comments

* fix missing import

* simplify

* Update homeassistant/components/mystrom/__init__.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/mystrom/__init__.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/mystrom/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/mystrom/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/mystrom/config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/mystrom/test_init.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/mystrom/test_init.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/mystrom/test_init.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/mystrom/test_init.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/mystrom/light.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/mystrom/switch.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* fix review comments

* fix review comments

* Update tests/components/mystrom/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/mystrom/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* fix review comment

* Update tests/components/mystrom/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/mystrom/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/mystrom/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/mystrom/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/mystrom/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/mystrom/test_config_flow.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-06-06 14:16:27 +02:00
Robert Svensson
ebafb1f2c8 Bump aiounifi to v48 - Fix fail to initialise due to board_rev not exist (#94093) 2023-06-06 09:08:17 +02:00
Justin Vanderhooft
0b880598ed fix: Bump melnor-bluetooth to fix deadlock (#94098) 2023-06-06 08:32:07 +02:00
G Johansson
49a394547a Remove platform YAML for Bose SoundTouch (#94090) 2023-06-06 08:26:36 +02:00
G Johansson
13da90da90 Remove left-over issue from platform YAML in Radarr (#94091) 2023-06-06 08:25:59 +02:00
Luke
554ed1e957 Add missing translation keys for Roborock mop intensity (#94088) 2023-06-06 08:25:25 +02:00
Álvaro Fernández Rojas
6019ec305a Update aioairzone to v0.6.3 and fix issue with latest firmware update (#94100) 2023-06-06 08:23:48 +02:00
G Johansson
9cbb993296 Remove Xbox YAML configuration (#94094) 2023-06-06 08:22:12 +02:00
Ian
4b4660994c Use shorthand attributes in NextBus (#94084)
* NextBus: Use attr with unique id

* Feedback

* Remove unique id
2023-06-06 07:08:42 +02:00
G Johansson
228da71cc4 Fix reload service in Command Line (#94085)
Fix multi platform reload service in command line
2023-06-05 15:54:51 -04:00
Luke
e30e423091 Don't add Roborock switches if it is not supported (#94069)
* don't add switches if it is not supported

* don't create entity unless if it is valid

* Raise on other exceptions

* rework valid_enties
2023-06-05 15:52:40 -04:00
Bram Kragten
7e72d3c562 Update frontend to 20230605.0 (#94083)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-05 20:16:11 +02:00
j4n-e4t
28f6062bab Add error handling to input_select integration (#93940) 2023-06-05 19:53:24 +02:00
Michael Hansen
e2c2262719 Bump intents to 2023.6.5 (#94077) 2023-06-05 19:49:01 +02:00
J. Nick Koston
fb9a9aea12 Fix wheel builds on armhf and armv7 (#94053) 2023-06-05 19:48:18 +02:00
G Johansson
40cb9337c5 Remove snapcast YAML configuration (#93547)
Remove platform yaml snapcast
2023-06-05 18:28:08 +02:00
G Johansson
d9ac041e17 Remove qbittorrent YAML configuration (#93548)
Remove platform yaml qbittorrent
2023-06-05 18:14:07 +02:00
Jan Bouwhuis
437de7c2a3 Fix mqtt climate initial temperature conversion and precision (#93965)
* Fix mqtt climate initial temperature conversion

* Avoid changing hass temperature_unit

* Update comment
2023-06-05 17:02:31 +02:00
Chris Xiao
5a80eddbd7 Clean up error logging in qbittorrent (#94071) 2023-06-05 16:21:23 +02:00
J. Nick Koston
be2389a9db Bump zeroconf to 0.64.0 (#94052) 2023-06-04 21:14:44 -05:00
Chris Talkington
d8b4d71475 Update pyipp to 0.14.0 (#94050) 2023-06-04 21:14:31 -05:00
Robert Hillis
7f480849e2 Add camera platform to Dremel (#93882)
* Add camera platform to Dremel

* unload and tests
2023-06-04 20:28:28 -04:00
J. Nick Koston
5078bb3bef Remove miniaudio pin now that upstream package has been fixed (#94034)
see https://github.com/irmen/pyminiaudio/issues/67#issuecomment-1575602707
2023-06-04 20:27:42 -04:00
Artem Draft
06bcb69a56 Add media stop to LG Netcast TV (#93615) 2023-06-04 19:26:26 -05:00
Maciej Bieniek
fe61672792 Don't inherit SensorEntity/NumberEntity and RestoreEntity in Shelly integration (#93531)
* Use RestoreNumber and Restore Sensor for block entities

* Update tests

* Use RestoreSensor for RPC entities

* Fix test for number platform
2023-06-04 19:14:08 -05:00
Ernst Klamer
7c02e1ca99 Bump xiaomi-ble to 0.17.2 (#94011)
Bump xiaomi-ble

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-06-04 19:07:37 -05:00
Pascal Reeb
a08e516da0 Update pynuki to 1.6.2 (#94041)
chore(component/nuki): update pynuki to 1.6.2
2023-06-04 19:06:38 -05:00
Luke
5d9c36ac44 Bump Roborock to 0.21.0 (#94035)
bump to 21.0
2023-06-04 19:02:13 -05:00
J. Nick Koston
09882923d2 Drop codeowner for gogogate2 (#94049) 2023-06-04 18:42:37 -05:00
Raman Gupta
5461d0e28f Fix zwave_js.update entity restore logic (#94043) 2023-06-05 00:35:17 +02:00
G Johansson
b5b9a06c2c Refactor Command Line sensor to use ManualTriggerEntity (#93999)
* Refactor sensor to use ManualTriggerEntity

* Add device and state class
2023-06-04 15:00:53 -04:00
G Johansson
1fe4c4fa59 Remove update_before_add from binary_sensor in Command Line (#94040)
Remove update_before_add
2023-06-04 14:53:34 -04:00
Rami Mosleh
07e26f9639 Drop codeowner for IMAP (#94033) 2023-06-04 11:59:03 -05:00
tronikos
53e456f453 Android TV Remote: Abort zeroconf if mac address is missing (#94026)
Abort zeroconf if mac address is missing
2023-06-04 10:49:18 +02:00
Joost Lekkerkerker
efb92ca9ee Show the sensor state using the coordinatordata instead of initial data (#94008)
* Show the sensor state using the coordinatordata instead of initial data

* Add test

* Remove part
2023-06-03 14:35:57 -04:00
G Johansson
76d8c047ec Refactor Command Line cover to use ManualTriggerEntity (#93997)
Refactor command_line cover
2023-06-03 14:19:59 -04:00
G Johansson
391c63640a Refactor Command Line binary sensor to use ManualTriggerEntity (#94000)
Refactor binary sensor ManualTriggerEntity
2023-06-03 14:11:42 -04:00
Michael Benz
305fa128fb Add reload support to intent_script (#93404)
* support live reload of intent_script

* add services.yaml

* update tesls for full code coverage

* Update based on feedback

* fix intent_script reload when no intent_script config

* Update homeassistant/helpers/intent.py

* update tests to handle no_existing better

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-06-03 14:02:23 -04:00
Paulus Schoutsen
65b62d877d Keep track what devices support Assist features (#93990) 2023-06-03 08:26:28 -05:00
tronikos
faacf1658f Fix error in tibber while fetching latest statistics (#93998) 2023-06-03 08:25:39 -05:00
G Johansson
038b0e6d23 Add scan interval to Command Line (#93752)
* Add scan interval

* Handle previous not complete

* Fix faulty text

* Add tests

* lingering

* Cool down

* Fix tests
2023-06-02 23:35:11 -04:00
Sven Serlier
aa636a2805 Fix broken URL in Z-Wave JS (#93983)
Fix broken URL
2023-06-02 16:54:15 -04:00
Robert Hillis
6c5fd40c92 Catch Google Sheets api error (#93979) 2023-06-02 16:18:58 -04:00
Simone Chemelli
2a9bcae365 Fritz: cleanup unused variables (#93971)
Cleanup
2023-06-02 16:17:16 -04:00
Diogo Gomes
b5f582eecc Make Riemann sum sensors restore last valid state (#93674)
* keep last valid state

* keep last valid state

* typo

* increase coverage

* better error handling

* debug messages

* increase coverage

* remove random log

* don't expose last_valid_state as an attribute
2023-06-02 08:44:36 -04:00
Raman Gupta
d9f059fcaa Improve logic for zwave_js.lock.is_locked attr (#93947) 2023-06-02 06:12:32 -04:00
Raman Gupta
3934f91242 Make Z-Wave device IBT4ZWAVE discoverable as a cover (#93946)
* Make Z-Wave device IBT4ZWAVE discoverable as a cover

* Test device class
2023-06-02 06:09:53 -04:00
Erik Montnemery
ce9a0059d1 Add empty config schema to stt (#93954) 2023-06-02 06:07:44 -04:00
Erik Montnemery
7db943d138 Add CONFIG_SCHEMA to imap_email_content (#93951)
* Add CONFIG_SCHEMA to imap_email_content

* Update homeassistant/components/imap_email_content/__init__.py

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

---------

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2023-06-02 06:06:59 -04:00
Erik Montnemery
3ed8e2d0e1 Add empty config schema to mailbox (#93953) 2023-06-02 09:28:13 +02:00
Erik Montnemery
0916a6c0cb Remove insteon import flow (#93952) 2023-06-02 09:21:19 +02:00
Chris Talkington
f941203949 Update pyipp to 0.13.0 (#93886) 2023-06-01 22:24:53 -05:00
Tudor Sandu
95e4ef2255 Fix states not being translated in voice assistants (#93572)
Fix states not being translated
2023-06-01 20:10:57 -04:00
J. Nick Koston
8ef799601b Bump aiohomekit to 2.6.4 (#93943)
changelog: https://github.com/Jc2k/aiohomekit/compare/2.6.3...2.6.4

mostly additional logging to help track down #93891
2023-06-01 19:54:44 -04:00
J. Nick Koston
b18356bb3f Fix august aiohttp session being closed out from under it (#93942)
* Fix august aiohttp session being closed out from under it

fixes #93941

* Fix august aiohttp session being closed out from under it

fixes #93941

* Fix august aiohttp session being closed out from under it

fixes #93941
2023-06-01 19:54:25 -04:00
automaton82
ba66a39668 Update netdata to 1.1.0, set longer timeout (#93937) 2023-06-01 22:23:26 +02:00
Erik Montnemery
bb5430ff59 Remove async_setup from locative (#93895)
* Remove async_setup from locative

* Micro-optimize async_setup_entry
2023-06-01 20:08:32 +02:00
Brent Perdue
23ca26ae56 Add save clips to Blink services (#84149) 2023-06-01 20:06:53 +02:00
Erik Montnemery
a1a055f618 Add config entry only config schema to integrations s-z (#93910) 2023-06-01 20:05:11 +02:00
puddly
cc47736d20 Include port info in the ZHA websocket settings response (#93934) 2023-06-01 19:53:41 +02:00
J. Nick Koston
457bc4571d Make RestoreStateData.async_get_instance backwards compatible (#93924) 2023-06-01 19:31:17 +02:00
J. Nick Koston
5a8daf06e8 Fix typing_extensions to match metadata (#93920) 2023-06-01 19:30:08 +02:00
andiukas
1a798f6eee Adding new supported language code to Google translate (#93926) 2023-06-01 19:29:15 +02:00
Bram Kragten
145a8bc41d Update frontend to 20230601.1 (#93927) 2023-06-01 19:23:42 +02:00
J. Nick Koston
5365d57bef Bump pyunifiprotect to 4.9.1 (#93931) 2023-06-01 19:20:32 +02:00
Tobias G
d4e352d6a7 Add humidity sensor to deconz component (#93024)
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2023-06-01 19:16:42 +02:00
J. Nick Koston
0ca53eccb8 Bump python-onvif-zeep to 3.1.9 (#93930) 2023-06-01 19:15:16 +02:00
J. Nick Koston
240372b45d Fix onvif cameras that use basic auth with no password (#93928) 2023-06-01 19:14:03 +02:00
Arjan
8f485be87e Properly order moon phases in attribute (#93933) 2023-06-01 19:09:09 +02:00
Sebastian Heiden
a260c11d4e Fix LaMetric Config Flow for SKY (#93483)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-06-01 18:04:00 +02:00
Erik Montnemery
f9037d5f6d Add platform only config schema to nsw_fuel_station and ping (#93913) 2023-06-01 17:30:15 +02:00
Joost Lekkerkerker
e33ae72f95 Bump python-opensky (#93916) 2023-06-01 11:01:51 -04:00
Joakim Plate
9aed5a47ae Raise exception instead of hide in logs on zha write (#93571)
Raise exception instead of hide in logs

Write request that failed parsing of data would fail,
yet display as successful in the gui.
2023-06-01 10:18:49 -04:00
disforw
1f0e235b99 Move QNAP constants (#93918)
* Create const.py

* Update sensor.py

* Add docstring

* Update sensor.py

* Update homeassistant/components/qnap/sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/qnap/const.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-06-01 16:13:07 +02:00
Erik Montnemery
1a3d6bbb9a Fix typo in cloud (#93917) 2023-06-01 15:21:15 +02:00
disforw
6c7d922def Adding myself as codeowner to QNAP (#93915)
* Adding codeowner and integration_type

* Update CODEOWNERS

* Update sorting

* Update integrations.json
2023-06-01 14:53:28 +02:00
Erik Montnemery
677dd5b1fd Remove async_setup from traccar (#93912) 2023-06-01 13:37:02 +02:00
Erik Montnemery
09e8d7df0f Remove async_setup from sky_hub (#93911) 2023-06-01 13:30:52 +02:00
Erik Montnemery
c1c319d4d1 Rename cv.no_yaml_config_schema to cv.config_entry_only_config_schema (#93908)
* Rename cv.no_yaml_config_schema to cv.config_entry_only_config_schema

* ✏️
2023-06-01 13:15:48 +02:00
RenierM26
e05c04fadb Add Ezviz light entity (#93710)
* Initial commit

* Add ezviz light entity.

* coveragerc

* Apply suggestions from code review

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-06-01 13:01:57 +02:00
Erik Montnemery
15e5cf01bb Add silabs_multiprotocol platform (#92904)
* Add silabs_multiprotocol platform

* Add new files

* Add ZHA tests

* Prevent ZHA from creating database during tests

* Add delay parameter to async_change_channel

* Add the updated dataset to the dataset store

* Allow MultipanProtocol.async_change_channel to return a task

* Notify user about the duration of migration

* Update tests
2023-06-01 12:32:14 +02:00
Erik Montnemery
4f153a8f90 Remove async_setup from hyperion (#93894) 2023-06-01 12:20:04 +02:00
Erik Montnemery
4e5902c15b Remove async_setup from gpslogger (#93893) 2023-06-01 12:19:14 +02:00
Erik Montnemery
c5dd540ffc Remove async_setup from econet (#93892) 2023-06-01 12:18:54 +02:00
Erik Montnemery
fd08cfb074 Add empty config schema to mobile_app (#93900) 2023-06-01 12:17:55 +02:00
Joost Lekkerkerker
a6b6b03f2e Add video id to youtube sensor state attributes (#93668)
* Add video id to state attributes

* Make extra state attributes not optional

* Revert "Make extra state attributes not optional"

This reverts commit d2f9e936c809dd50a5e4bbdaa181c9c9ddd3d217.
2023-06-01 11:46:59 +02:00
Erik Montnemery
a4b8b4f7c2 Add config entry only config schema to integrations a-r (#93899) 2023-06-01 11:42:14 +02:00
Erik Montnemery
f2ea2a886c Remove setup from remote_rpi_gpio (#93901) 2023-06-01 11:36:20 +02:00
Erik Montnemery
08bfe8f5cc Remove async_setup from ring (#93902) 2023-06-01 11:34:18 +02:00
Erik Montnemery
ba76bbee44 Remove async_setup from zerproc (#93903) 2023-06-01 11:33:37 +02:00
Erik Montnemery
e0db9ab041 Add CONFIG_SCHEMA to broadlink (#93854)
* Add CONFIG_SCHEMA to broadlink

* Simplify error message

* Rename to no_yaml_config_schema

* Add tests

* Raise issue

* Tweak repairs issue description and title

* Update homeassistant/helpers/config_validation.py

* Add link

* Update homeassistant/components/homeassistant/strings.json

Co-authored-by: Franck Nijhof <git@frenck.dev>

* Fix logic, add test

---------

Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-01 09:51:26 +02:00
Tom Harris
f73754ff58 Restructure Insteon start-up (#92818)
* Restructure startup

* Code review

* Further typing

* Fix circular import
2023-06-01 08:50:35 +02:00
Paulus Schoutsen
938ff679de Bump frontend to 20230601.0 (#93884) 2023-05-31 21:14:59 -04:00
J. Nick Koston
7995d3777a Fix package names to match pypi index metadata (#93883)
* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* Fix package names to match pypi index metadata

* uses _

* uses -

* fix metadata
2023-05-31 21:12:53 -04:00
Diogo Gomes
046ae8eb1e Delay filter integration until after HA has started (#91034)
* delay filter start

* Update homeassistant/components/filter/sensor.py

* Update homeassistant/components/filter/sensor.py

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-05-31 21:10:15 -04:00
Diogo Gomes
022fa1ee67 Always update Filter sensors attr on new_state (#89096)
* always update attr

* reset filter on unit change
2023-05-31 21:03:55 -04:00
Álvaro Fernández Rojas
11e268775c Update aioairzone-cloud to v0.1.7 (#93871)
* Update aioairzone-cloud to v0.1.7

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone_cloud: fix copy&paste description

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-31 20:09:23 -04:00
puddly
b9ec3a8af8 Increase Zigbee command retries (#93877)
* Enable retries for requests

* Update unit tests

* Account for fewer group retries in unit tests
2023-05-31 20:08:18 -04:00
Robert Hillis
226647f625 Add binary sensor platform to Dremel 3D Printer (#93881)
Add binary sensor platform to Dremel
2023-05-31 20:07:14 -04:00
mkmer
198608906c Address late review for whirlpool (#93874)
Address late review
2023-06-01 00:21:13 +02:00
Mike Degatano
e272e3c721 Refactor try catch in hassio.issues per feedback (#93872) 2023-06-01 00:11:00 +02:00
Jeff Grieger
47a2d5b472 Add zwave_js speed config for additional GE/Jasco fan controllers (#92371)
* Add zwave_js speed config for additional GE/Jasco fan controllers

Add speed info for Honeywell(GE/Jasco) 39358 In-Wall Fan Speed Control and Enbrighten(GE/Jasco) 55258 In-Wall Fan Speed Control.

* Add test for Honeywell 39358 In-Wall Fan Speed Control
2023-06-01 00:09:35 +02:00
Paulus Schoutsen
cd330a2740 Pass device ID to conversation input (#93867) 2023-05-31 16:56:12 -04:00
Robert Hillis
a1e9cf1c24 Add Dremel 3D Printer integration (#85969)
* Add Dremel 3D Printer integration

* remove validators requirement

* ruff

* uno mas

* uno mas

* uno mas

* uno mas

---------

Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Tom Harris <tomharris@harrisnj.net>
2023-05-31 16:55:57 -04:00
Franck Nijhof
8d8d0fc9d2 Bump version to 2023.7.0dev0 (#93869) 2023-05-31 20:34:30 +02:00
1850 changed files with 58155 additions and 14983 deletions

View File

@@ -27,6 +27,7 @@ base_platforms: &base_platforms
- homeassistant/components/fan/**
- homeassistant/components/geo_location/**
- homeassistant/components/humidifier/**
- homeassistant/components/image/**
- homeassistant/components/image_processing/**
- homeassistant/components/light/**
- homeassistant/components/lock/**

View File

@@ -90,6 +90,8 @@ omit =
homeassistant/components/atome/*
homeassistant/components/aurora/__init__.py
homeassistant/components/aurora/binary_sensor.py
homeassistant/components/aurora/coordinator.py
homeassistant/components/aurora/entity.py
homeassistant/components/aurora/sensor.py
homeassistant/components/avea/light.py
homeassistant/components/avion/light.py
@@ -122,7 +124,6 @@ omit =
homeassistant/components/bluetooth_tracker/*
homeassistant/components/bmw_connected_drive/__init__.py
homeassistant/components/bmw_connected_drive/binary_sensor.py
homeassistant/components/bmw_connected_drive/button.py
homeassistant/components/bmw_connected_drive/coordinator.py
homeassistant/components/bmw_connected_drive/lock.py
homeassistant/components/bmw_connected_drive/notify.py
@@ -202,6 +203,9 @@ omit =
homeassistant/components/discogs/sensor.py
homeassistant/components/discord/__init__.py
homeassistant/components/discord/notify.py
homeassistant/components/discovergy/__init__.py
homeassistant/components/discovergy/sensor.py
homeassistant/components/discovergy/coordinator.py
homeassistant/components/dlib_face_detect/image_processing.py
homeassistant/components/dlib_face_identify/image_processing.py
homeassistant/components/dlink/data.py
@@ -302,22 +306,10 @@ omit =
homeassistant/components/escea/climate.py
homeassistant/components/escea/discovery.py
homeassistant/components/esphome/__init__.py
homeassistant/components/esphome/binary_sensor.py
homeassistant/components/esphome/bluetooth/*
homeassistant/components/esphome/button.py
homeassistant/components/esphome/camera.py
homeassistant/components/esphome/climate.py
homeassistant/components/esphome/cover.py
homeassistant/components/esphome/domain_data.py
homeassistant/components/esphome/entry_data.py
homeassistant/components/esphome/fan.py
homeassistant/components/esphome/light.py
homeassistant/components/esphome/lock.py
homeassistant/components/esphome/media_player.py
homeassistant/components/esphome/number.py
homeassistant/components/esphome/select.py
homeassistant/components/esphome/sensor.py
homeassistant/components/esphome/switch.py
homeassistant/components/etherscan/sensor.py
homeassistant/components/eufy/*
homeassistant/components/eufylife_ble/__init__.py
@@ -327,6 +319,7 @@ omit =
homeassistant/components/ezviz/__init__.py
homeassistant/components/ezviz/binary_sensor.py
homeassistant/components/ezviz/camera.py
homeassistant/components/ezviz/light.py
homeassistant/components/ezviz/coordinator.py
homeassistant/components/ezviz/number.py
homeassistant/components/ezviz/entity.py
@@ -362,10 +355,13 @@ omit =
homeassistant/components/fitbit/*
homeassistant/components/fivem/__init__.py
homeassistant/components/fivem/binary_sensor.py
homeassistant/components/fivem/coordinator.py
homeassistant/components/fivem/entity.py
homeassistant/components/fivem/sensor.py
homeassistant/components/fixer/sensor.py
homeassistant/components/fjaraskupan/__init__.py
homeassistant/components/fjaraskupan/binary_sensor.py
homeassistant/components/fjaraskupan/coordinator.py
homeassistant/components/fjaraskupan/fan.py
homeassistant/components/fjaraskupan/light.py
homeassistant/components/fjaraskupan/number.py
@@ -615,7 +611,6 @@ omit =
homeassistant/components/kwb/sensor.py
homeassistant/components/lacrosse/sensor.py
homeassistant/components/lannouncer/notify.py
homeassistant/components/lastfm/sensor.py
homeassistant/components/launch_library/__init__.py
homeassistant/components/launch_library/sensor.py
homeassistant/components/lcn/climate.py
@@ -946,6 +941,8 @@ omit =
homeassistant/components/pyload/sensor.py
homeassistant/components/qbittorrent/__init__.py
homeassistant/components/qbittorrent/sensor.py
homeassistant/components/qnap/__init__.py
homeassistant/components/qnap/coordinator.py
homeassistant/components/qnap/sensor.py
homeassistant/components/qrcode/image_processing.py
homeassistant/components/quantum_gateway/device_tracker.py
@@ -973,6 +970,10 @@ omit =
homeassistant/components/rainmachine/switch.py
homeassistant/components/rainmachine/update.py
homeassistant/components/rainmachine/util.py
homeassistant/components/renson/__init__.py
homeassistant/components/renson/const.py
homeassistant/components/renson/entity.py
homeassistant/components/renson/sensor.py
homeassistant/components/raspyrfm/*
homeassistant/components/recollect_waste/sensor.py
homeassistant/components/recorder/repack.py
@@ -1046,12 +1047,6 @@ omit =
homeassistant/components/sense/__init__.py
homeassistant/components/sense/binary_sensor.py
homeassistant/components/sense/sensor.py
homeassistant/components/senseme/__init__.py
homeassistant/components/senseme/discovery.py
homeassistant/components/senseme/entity.py
homeassistant/components/senseme/fan.py
homeassistant/components/senseme/light.py
homeassistant/components/senseme/switch.py
homeassistant/components/senz/__init__.py
homeassistant/components/senz/api.py
homeassistant/components/senz/climate.py

View File

@@ -10,7 +10,7 @@ on:
env:
BUILD_TYPE: core
DEFAULT_PYTHON: "3.10"
DEFAULT_PYTHON: "3.11"
jobs:
init:
@@ -24,7 +24,7 @@ jobs:
publish: ${{ steps.version.outputs.publish }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
with:
fetch-depth: 0
@@ -48,18 +48,6 @@ jobs:
with:
ignore-dev: true
- name: Generate meta info
shell: bash
run: |
echo "${{ github.sha }};${{ github.ref }};${{ github.event_name }};${{ github.actor }}" > OFFICIAL_IMAGE
- name: Signing meta info file
uses: home-assistant/actions/helpers/codenotary@master
with:
source: file://${{ github.workspace }}/OFFICIAL_IMAGE
asset: OFFICIAL_IMAGE-${{ steps.version.outputs.version }}
token: ${{ secrets.CAS_TOKEN }}
build_python:
name: Build PyPi package
environment: ${{ needs.init.outputs.channel }}
@@ -68,7 +56,7 @@ jobs:
if: github.repository_owner == 'home-assistant' && needs.init.outputs.publish == 'true'
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.6.1
@@ -101,12 +89,16 @@ jobs:
if: github.repository_owner == 'home-assistant'
needs: init
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
strategy:
matrix:
arch: ${{ fromJson(needs.init.outputs.architectures) }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Download nightly wheels of frontend
if: needs.init.outputs.channel == 'dev'
@@ -182,7 +174,7 @@ jobs:
# will drop the platform in the near future (they consider it
# "flimsy" on 386). The following packages depend on pandas,
# so we comment them out.
sed -i "s|env_canada|# env_canada|g" requirements_all.txt
sed -i "s|env-canada|# env-canada|g" requirements_all.txt
sed -i "s|noaa-coops|# noaa-coops|g" requirements_all.txt
sed -i "s|pyezviz|# pyezviz|g" requirements_all.txt
sed -i "s|pykrakenapi|# pykrakenapi|g" requirements_all.txt
@@ -197,25 +189,20 @@ jobs:
run: |
echo "${{ github.sha }};${{ github.ref }};${{ github.event_name }};${{ github.actor }}" > rootfs/OFFICIAL_IMAGE
- name: Login to DockerHub
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2.1.0
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build base image
uses: home-assistant/builder@2023.03.0
uses: home-assistant/builder@2023.06.1
with:
args: |
$BUILD_ARGS \
--${{ matrix.arch }} \
--cosign \
--target /data \
--generic ${{ needs.init.outputs.version }}
env:
@@ -237,6 +224,10 @@ jobs:
if: github.repository_owner == 'home-assistant'
needs: ["init", "build_base"]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
strategy:
matrix:
machine:
@@ -262,7 +253,7 @@ jobs:
- yellow
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set build additional args
run: |
@@ -275,25 +266,20 @@ jobs:
echo "BUILD_ARGS=--additional-tag stable" >> $GITHUB_ENV
fi
- name: Login to DockerHub
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2.1.0
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build base image
uses: home-assistant/builder@2023.03.0
uses: home-assistant/builder@2023.06.1
with:
args: |
$BUILD_ARGS \
--target /data/machine \
--cosign \
--machine "${{ needs.init.outputs.version }}=${{ matrix.machine }}"
env:
CAS_API_KEY: ${{ secrets.CAS_TOKEN }}
@@ -306,7 +292,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Initialize git
uses: home-assistant/actions/helpers/git-init@master
@@ -338,34 +324,32 @@ jobs:
if: github.repository_owner == 'home-assistant'
needs: ["init", "build_base"]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
registry:
- "ghcr.io/home-assistant"
- "homeassistant"
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Install Cosign
uses: sigstore/cosign-installer@v3.1.1
with:
cosign-release: "v2.0.2"
- name: Login to DockerHub
if: matrix.registry == 'homeassistant'
uses: docker/login-action@v2.1.0
uses: docker/login-action@v2.2.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
if: matrix.registry == 'ghcr.io/home-assistant'
uses: docker/login-action@v2.1.0
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install CAS tools
uses: home-assistant/actions/helpers/cas@master
- name: Build Meta Image
shell: bash
run: |
@@ -375,55 +359,78 @@ jobs:
local tag_l=${1}
local tag_r=${2}
docker manifest create "${{ matrix.registry }}/home-assistant:${tag_l}" \
"${{ matrix.registry }}/amd64-homeassistant:${tag_r}" \
"${{ matrix.registry }}/i386-homeassistant:${tag_r}" \
"${{ matrix.registry }}/armhf-homeassistant:${tag_r}" \
"${{ matrix.registry }}/armv7-homeassistant:${tag_r}" \
"${{ matrix.registry }}/aarch64-homeassistant:${tag_r}"
for registry in "ghcr.io/home-assistant" "docker.io/homeassistant"
do
docker manifest annotate "${{ matrix.registry }}/home-assistant:${tag_l}" \
"${{ matrix.registry }}/amd64-homeassistant:${tag_r}" \
--os linux --arch amd64
docker manifest create "${registry}/home-assistant:${tag_l}" \
"${registry}/amd64-homeassistant:${tag_r}" \
"${registry}/i386-homeassistant:${tag_r}" \
"${registry}/armhf-homeassistant:${tag_r}" \
"${registry}/armv7-homeassistant:${tag_r}" \
"${registry}/aarch64-homeassistant:${tag_r}"
docker manifest annotate "${{ matrix.registry }}/home-assistant:${tag_l}" \
"${{ matrix.registry }}/i386-homeassistant:${tag_r}" \
--os linux --arch 386
docker manifest annotate "${registry}/home-assistant:${tag_l}" \
"${registry}/amd64-homeassistant:${tag_r}" \
--os linux --arch amd64
docker manifest annotate "${{ matrix.registry }}/home-assistant:${tag_l}" \
"${{ matrix.registry }}/armhf-homeassistant:${tag_r}" \
--os linux --arch arm --variant=v6
docker manifest annotate "${registry}/home-assistant:${tag_l}" \
"${registry}/i386-homeassistant:${tag_r}" \
--os linux --arch 386
docker manifest annotate "${{ matrix.registry }}/home-assistant:${tag_l}" \
"${{ matrix.registry }}/armv7-homeassistant:${tag_r}" \
--os linux --arch arm --variant=v7
docker manifest annotate "${registry}/home-assistant:${tag_l}" \
"${registry}/armhf-homeassistant:${tag_r}" \
--os linux --arch arm --variant=v6
docker manifest annotate "${{ matrix.registry }}/home-assistant:${tag_l}" \
"${{ matrix.registry }}/aarch64-homeassistant:${tag_r}" \
--os linux --arch arm64 --variant=v8
docker manifest annotate "${registry}/home-assistant:${tag_l}" \
"${registry}/armv7-homeassistant:${tag_r}" \
--os linux --arch arm --variant=v7
docker manifest push --purge "${{ matrix.registry }}/home-assistant:${tag_l}"
docker manifest annotate "${registry}/home-assistant:${tag_l}" \
"${registry}/aarch64-homeassistant:${tag_r}" \
--os linux --arch arm64 --variant=v8
docker manifest push --purge "${registry}/home-assistant:${tag_l}"
cosign sign --yes "${registry}/home-assistant:${tag_l}"
done
}
function validate_image() {
local image=${1}
if ! cas authenticate --signerID notary@home-assistant.io "docker://${image}"; then
if ! cosign verify --certificate-oidc-issuer https://token.actions.githubusercontent.com --certificate-identity-regexp https://github.com/home-assistant/core/.* "${image}"; then
echo "Invalid signature!"
exit 1
fi
}
docker pull "${{ matrix.registry }}/amd64-homeassistant:${{ needs.init.outputs.version }}"
docker pull "${{ matrix.registry }}/i386-homeassistant:${{ needs.init.outputs.version }}"
docker pull "${{ matrix.registry }}/armhf-homeassistant:${{ needs.init.outputs.version }}"
docker pull "${{ matrix.registry }}/armv7-homeassistant:${{ needs.init.outputs.version }}"
docker pull "${{ matrix.registry }}/aarch64-homeassistant:${{ needs.init.outputs.version }}"
function push_dockerhub() {
local image=${1}
local tag=${2}
validate_image "${{ matrix.registry }}/amd64-homeassistant:${{ needs.init.outputs.version }}"
validate_image "${{ matrix.registry }}/i386-homeassistant:${{ needs.init.outputs.version }}"
validate_image "${{ matrix.registry }}/armhf-homeassistant:${{ needs.init.outputs.version }}"
validate_image "${{ matrix.registry }}/armv7-homeassistant:${{ needs.init.outputs.version }}"
validate_image "${{ matrix.registry }}/aarch64-homeassistant:${{ needs.init.outputs.version }}"
docker tag "ghcr.io/home-assistant/${image}:${tag}" "docker.io/homeassistant/${image}:${tag}"
docker push "docker.io/homeassistant/${image}:${tag}"
cosign sign --yes "docker.io/homeassistant/${image}:${tag}"
}
# Pull images from github container registry and verify signature
docker pull "ghcr.io/home-assistant/amd64-homeassistant:${{ needs.init.outputs.version }}"
docker pull "ghcr.io/home-assistant/i386-homeassistant:${{ needs.init.outputs.version }}"
docker pull "ghcr.io/home-assistant/armhf-homeassistant:${{ needs.init.outputs.version }}"
docker pull "ghcr.io/home-assistant/armv7-homeassistant:${{ needs.init.outputs.version }}"
docker pull "ghcr.io/home-assistant/aarch64-homeassistant:${{ needs.init.outputs.version }}"
validate_image "ghcr.io/home-assistant/amd64-homeassistant:${{ needs.init.outputs.version }}"
validate_image "ghcr.io/home-assistant/i386-homeassistant:${{ needs.init.outputs.version }}"
validate_image "ghcr.io/home-assistant/armhf-homeassistant:${{ needs.init.outputs.version }}"
validate_image "ghcr.io/home-assistant/armv7-homeassistant:${{ needs.init.outputs.version }}"
validate_image "ghcr.io/home-assistant/aarch64-homeassistant:${{ needs.init.outputs.version }}"
# Upload images to dockerhub
push_dockerhub "amd64-homeassistant" "${{ needs.init.outputs.version }}"
push_dockerhub "i386-homeassistant" "${{ needs.init.outputs.version }}"
push_dockerhub "armhf-homeassistant" "${{ needs.init.outputs.version }}"
push_dockerhub "armv7-homeassistant" "${{ needs.init.outputs.version }}"
push_dockerhub "aarch64-homeassistant" "${{ needs.init.outputs.version }}"
# Create version tag
create_manifest "${{ needs.init.outputs.version }}" "${{ needs.init.outputs.version }}"

View File

@@ -32,7 +32,7 @@ env:
CACHE_VERSION: 5
PIP_CACHE_VERSION: 4
MYPY_CACHE_VERSION: 4
HA_SHORT_VERSION: 2023.6
HA_SHORT_VERSION: 2023.7
DEFAULT_PYTHON: "3.10"
ALL_PYTHON_VERSIONS: "['3.10', '3.11']"
# 10.3 is the oldest supported version
@@ -82,7 +82,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Generate partial Python venv restore key
id: generate_python_cache_key
run: >-
@@ -206,7 +206,7 @@ jobs:
- info
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4.6.1
@@ -251,7 +251,7 @@ jobs:
- pre-commit
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.6.1
id: python
@@ -297,7 +297,7 @@ jobs:
- pre-commit
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.6.1
id: python
@@ -338,44 +338,6 @@ jobs:
shopt -s globstar
pre-commit run --hook-stage manual ruff --files {homeassistant,tests}/components/${{ needs.info.outputs.integrations_glob }}/{*,**/*} --show-diff-on-failure
lint-isort:
name: Check isort
runs-on: ubuntu-22.04
needs:
- info
- pre-commit
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.6.1
id: python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache/restore@v3.3.1
with:
path: venv
fail-on-cache-miss: true
key: >-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{
needs.info.outputs.pre-commit_cache_key }}
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache/restore@v3.3.1
with:
path: ${{ env.PRE_COMMIT_CACHE }}
fail-on-cache-miss: true
key: >-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
needs.info.outputs.pre-commit_cache_key }}
- name: Run isort
run: |
. venv/bin/activate
pre-commit run --hook-stage manual isort --all-files --show-diff-on-failure
lint-other:
name: Check other linters
runs-on: ubuntu-22.04
@@ -384,7 +346,7 @@ jobs:
- pre-commit
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.6.1
id: python
@@ -468,19 +430,6 @@ jobs:
with:
args: hadolint Dockerfile.dev
- name: Run bandit (fully)
if: needs.info.outputs.test_full_suite == 'true'
run: |
. venv/bin/activate
pre-commit run --hook-stage manual bandit --all-files --show-diff-on-failure
- name: Run bandit (partially)
if: needs.info.outputs.test_full_suite == 'false'
shell: bash
run: |
. venv/bin/activate
shopt -s globstar
pre-commit run --hook-stage manual bandit --files {homeassistant,tests}/components/${{ needs.info.outputs.integrations_glob }}/{*,**/*} --show-diff-on-failure
base:
name: Prepare dependencies
runs-on: ubuntu-22.04
@@ -491,7 +440,7 @@ jobs:
python-version: ${{ fromJSON(needs.info.outputs.python_versions) }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v4.6.1
@@ -543,10 +492,10 @@ jobs:
python -m venv venv
. venv/bin/activate
python --version
pip install --cache-dir=$PIP_CACHE -U "pip>=21.0,<23.2" setuptools wheel
pip install --cache-dir=$PIP_CACHE -U "pip>=21.3.1,<23.2" setuptools wheel
pip install --cache-dir=$PIP_CACHE -r requirements_all.txt
pip install --cache-dir=$PIP_CACHE -r requirements_test.txt
pip install -e .
pip install -e . --config-settings editable_mode=compat
hassfest:
name: Check hassfest
@@ -559,7 +508,7 @@ jobs:
- base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4.6.1
@@ -591,7 +540,7 @@ jobs:
- base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4.6.1
@@ -624,7 +573,7 @@ jobs:
- base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4.6.1
@@ -668,7 +617,7 @@ jobs:
- base
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4.6.1
@@ -732,7 +681,6 @@ jobs:
- base
- gen-requirements-all
- hassfest
- lint-isort
- lint-other
- lint-ruff
- mypy
@@ -751,7 +699,7 @@ jobs:
bluez \
ffmpeg
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v4.6.1
@@ -857,7 +805,6 @@ jobs:
- base
- gen-requirements-all
- hassfest
- lint-isort
- lint-other
- lint-ruff
- mypy
@@ -877,7 +824,7 @@ jobs:
ffmpeg \
libmariadb-dev-compat
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v4.6.1
@@ -965,7 +912,6 @@ jobs:
- base
- gen-requirements-all
- hassfest
- lint-isort
- lint-other
- lint-ruff
- mypy
@@ -985,7 +931,7 @@ jobs:
ffmpeg \
postgresql-server-dev-14
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v4.6.1
@@ -1062,12 +1008,12 @@ jobs:
timeout-minutes: 10
steps:
- name: Check out code from GitHub
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Download all coverage artifacts
uses: actions/download-artifact@v3
- name: Upload coverage to Codecov (full coverage)
if: needs.info.outputs.test_full_suite == 'true'
uses: Wandalen/wretry.action@v1.0.36
uses: Wandalen/wretry.action@v1.3.0
with:
action: codecov/codecov-action@v3.1.3
with: |
@@ -1077,7 +1023,7 @@ jobs:
attempt_delay: 30000
- name: Upload coverage to Codecov (partial coverage)
if: needs.info.outputs.test_full_suite == 'false'
uses: Wandalen/wretry.action@v1.0.36
uses: Wandalen/wretry.action@v1.3.0
with:
action: codecov/codecov-action@v3.1.3
with: |

View File

@@ -10,7 +10,7 @@ jobs:
if: github.repository_owner == 'home-assistant'
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v4.0.0
- uses: dessant/lock-threads@v4.0.1
with:
github-token: ${{ github.token }}
issue-inactive-days: "30"

View File

@@ -10,7 +10,7 @@ on:
- "**strings.json"
env:
DEFAULT_PYTHON: "3.10"
DEFAULT_PYTHON: "3.11"
jobs:
upload:
@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.6.1

View File

@@ -26,7 +26,7 @@ jobs:
architectures: ${{ steps.info.outputs.architectures }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Get information
id: info
@@ -47,10 +47,7 @@ jobs:
echo "GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=true"
echo "GRPC_PYTHON_BUILD_WITH_CYTHON=true"
echo "GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=true"
# GRPC on armv7 needs -lexecinfo (issue #56669) since home assistant installs
# execinfo-dev when building wheels. The setuptools build setup does not have an option for
# adding a single LDFLAG so copy all relevant linux flags here (as of 1.43.0)
echo "GRPC_PYTHON_LDFLAGS=-lpthread -Wl,-wrap,memcpy -static-libgcc -lexecinfo"
echo "GRPC_PYTHON_LDFLAGS=-lpthread -Wl,-wrap,memcpy -static-libgcc"
# Fix out of memory issues with rust
echo "CARGO_NET_GIT_FETCH_WITH_CLI=true"
@@ -83,11 +80,11 @@ jobs:
strategy:
fail-fast: false
matrix:
abi: ["cp310", "cp311"]
abi: ["cp311"]
arch: ${{ fromJson(needs.init.outputs.architectures) }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Download env_file
uses: actions/download-artifact@v3
@@ -113,100 +110,6 @@ jobs:
requirements-diff: "requirements_diff.txt"
requirements: "requirements.txt"
integrations_cp310:
name: Build wheels ${{ matrix.abi }} for ${{ matrix.arch }}
if: github.repository_owner == 'home-assistant'
needs: init
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
abi: ["cp310"]
arch: ${{ fromJson(needs.init.outputs.architectures) }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
- name: Download env_file
uses: actions/download-artifact@v3
with:
name: env_file
- name: Download requirements_diff
uses: actions/download-artifact@v3
with:
name: requirements_diff
- name: Uncomment packages
run: |
requirement_files="requirements_all.txt requirements_diff.txt"
for requirement_file in ${requirement_files}; do
sed -i "s|# pybluez|pybluez|g" ${requirement_file}
sed -i "s|# beacontools|beacontools|g" ${requirement_file}
sed -i "s|# fritzconnection|fritzconnection|g" ${requirement_file}
sed -i "s|# pyuserinput|pyuserinput|g" ${requirement_file}
sed -i "s|# evdev|evdev|g" ${requirement_file}
sed -i "s|# pycups|pycups|g" ${requirement_file}
sed -i "s|# homekit|homekit|g" ${requirement_file}
sed -i "s|# decora_wifi|decora_wifi|g" ${requirement_file}
sed -i "s|# python-gammu|python-gammu|g" ${requirement_file}
sed -i "s|# opencv-python-headless|opencv-python-headless|g" ${requirement_file}
done
- name: Split requirements all
run: |
# We split requirements all into two different files.
# This is to prevent the build from running out of memory when
# resolving packages on 32-bits systems (like armhf, armv7).
split -l $(expr $(expr $(cat requirements_all.txt | wc -l) + 1) / 2) requirements_all.txt requirements_all.txt
- name: Adjust build env
run: |
if [ "${{ matrix.arch }}" = "i386" ]; then
echo "NPY_DISABLE_SVML=1" >> .env_file
fi
(
# cmake > 3.22.2 have issue on arm
# Tested until 3.22.5
echo "cmake==3.22.2"
) >> homeassistant/package_constraints.txt
# Do not pin numpy in wheels building
sed -i "/numpy/d" homeassistant/package_constraints.txt
- name: Build wheels (part 1)
uses: home-assistant/wheels@2023.04.0
with:
abi: ${{ matrix.abi }}
tag: musllinux_1_2
arch: ${{ matrix.arch }}
wheels-key: ${{ secrets.WHEELS_KEY }}
env-file: true
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
skip-binary: aiohttp;grpcio;sqlalchemy;protobuf
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements_all.txtaa"
- name: Build wheels (part 2)
uses: home-assistant/wheels@2023.04.0
with:
abi: ${{ matrix.abi }}
tag: musllinux_1_2
arch: ${{ matrix.arch }}
wheels-key: ${{ secrets.WHEELS_KEY }}
env-file: true
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
skip-binary: aiohttp;grpcio;sqlalchemy;protobuf
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements_all.txtab"
# Wheels building for the cp311 ABI is currently split
# This is mainly until we have figured out to get all wheels built.
# Without harming our current workflow.
integrations_cp311:
name: Build wheels ${{ matrix.abi }} for ${{ matrix.arch }}
if: github.repository_owner == 'home-assistant'
@@ -219,31 +122,12 @@ jobs:
arch: ${{ fromJson(needs.init.outputs.architectures) }}
steps:
- name: Checkout the repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3
- name: Write alternative env-file for cp311
run: |
(
echo "GRPC_BUILD_WITH_BORING_SSL_ASM=false"
echo "GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=true"
echo "GRPC_PYTHON_BUILD_WITH_CYTHON=true"
echo "GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=true"
# GRPC on armv7 needed -lexecinfo (issue #56669) since home assistant installed
# execinfo-dev when building wheels. However, this package is no longer available
# Alpine 3.17, which we use for the cp311 ABI, so the flag should no longer be needed.
echo "GRPC_PYTHON_LDFLAGS=-lpthread -Wl,-wrap,memcpy -static-libgcc" # -lexecinfo
# Fix out of memory issues with rust
echo "CARGO_NET_GIT_FETCH_WITH_CLI=true"
# OpenCV headless installation
echo "CI_BUILD=1"
echo "ENABLE_HEADLESS=1"
# Use C-Extension for sqlalchemy
echo "REQUIRE_SQLALCHEMY_CEXT=1"
) > .env_file
- name: Download env_file
uses: actions/download-artifact@v3
with:
name: env_file
- name: Download requirements_diff
uses: actions/download-artifact@v3
@@ -254,27 +138,12 @@ jobs:
run: |
requirement_files="requirements_all.txt requirements_diff.txt"
for requirement_file in ${requirement_files}; do
# PyBluez no longer compiles. Commented it out for now.
# It need further cleanup down the line, as all machine images
# try to install it.
# sed -i "s|# pybluez|pybluez|g" ${requirement_file}
# beacontools requires PyBluez.
# sed -i "s|# beacontools|beacontools|g" ${requirement_file}
# It doesn't build for some reason, so we skip it for now.
# Bumping to the latest version (4.7.0.72) supporting Python 3.11
# doesn't help. Reverted bump in #91871. There are 8 registered
# instances using this integration according to analytics.
# sed -i "s|# opencv-python-headless|opencv-python-headless|g" ${requirement_file}
sed -i "s|# fritzconnection|fritzconnection|g" ${requirement_file}
sed -i "s|# pyuserinput|pyuserinput|g" ${requirement_file}
sed -i "s|# evdev|evdev|g" ${requirement_file}
sed -i "s|# pycups|pycups|g" ${requirement_file}
sed -i "s|# homekit|homekit|g" ${requirement_file}
sed -i "s|# decora_wifi|decora_wifi|g" ${requirement_file}
sed -i "s|# decora-wifi|decora-wifi|g" ${requirement_file}
sed -i "s|# python-gammu|python-gammu|g" ${requirement_file}
# Some packages are not buildable on armhf anymore
@@ -284,7 +153,7 @@ jobs:
# will drop the platform in the near future (they consider it
# "flimsy" on 386). The following packages depend on pandas,
# so we comment them out.
sed -i "s|env_canada|# env_canada|g" ${requirement_file}
sed -i "s|env-canada|# env-canada|g" ${requirement_file}
sed -i "s|noaa-coops|# noaa-coops|g" ${requirement_file}
sed -i "s|pyezviz|# pyezviz|g" ${requirement_file}
sed -i "s|pykrakenapi|# pykrakenapi|g" ${requirement_file}
@@ -297,7 +166,7 @@ jobs:
# This is to prevent the build from running out of memory when
# resolving packages on 32-bits systems (like armhf, armv7).
split -l $(expr $(expr $(cat requirements_all.txt | wc -l) + 1) / 2) requirements_all.txt requirements_all.txt
split -l $(expr $(expr $(cat requirements_all.txt | wc -l) + 1) / 3) requirements_all.txt requirements_all.txt
- name: Adjust build env
run: |
@@ -305,13 +174,6 @@ jobs:
echo "NPY_DISABLE_SVML=1" >> .env_file
fi
# Probably not an issue anymore. Removing for now.
# (
# # cmake > 3.22.2 have issue on arm
# # Tested until 3.22.5
# echo "cmake==3.22.2"
# ) >> homeassistant/package_constraints.txt
# Do not pin numpy in wheels building
sed -i "/numpy/d" homeassistant/package_constraints.txt
@@ -342,3 +204,17 @@ jobs:
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements_all.txtab"
- name: Build wheels (part 3)
uses: home-assistant/wheels@2023.04.0
with:
abi: ${{ matrix.abi }}
tag: musllinux_1_2
arch: ${{ matrix.arch }}
wheels-key: ${{ secrets.WHEELS_KEY }}
env-file: true
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
skip-binary: aiohttp;grpcio;sqlalchemy;protobuf
constraints: "homeassistant/package_constraints.txt"
requirements-diff: "requirements_diff.txt"
requirements: "requirements_all.txtac"

View File

@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.262
rev: v0.0.272
hooks:
- id: ruff
args:
@@ -22,19 +22,6 @@ repos:
- --quiet-level=2
exclude_types: [csv, json]
exclude: ^tests/fixtures/|homeassistant/generated/
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
args:
- --quiet
- --format=custom
- --configfile=tests/bandit.yaml
files: ^(homeassistant|script|tests)/.+\.py$
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:

View File

@@ -172,6 +172,7 @@ homeassistant.components.huawei_lte.*
homeassistant.components.hydrawise.*
homeassistant.components.hyperion.*
homeassistant.components.ibeacon.*
homeassistant.components.image.*
homeassistant.components.image_processing.*
homeassistant.components.image_upload.*
homeassistant.components.imap.*
@@ -243,6 +244,7 @@ homeassistant.components.overkiz.*
homeassistant.components.peco.*
homeassistant.components.persistent_notification.*
homeassistant.components.pi_hole.*
homeassistant.components.ping.*
homeassistant.components.powerwall.*
homeassistant.components.proximity.*
homeassistant.components.prusalink.*
@@ -275,7 +277,6 @@ homeassistant.components.scene.*
homeassistant.components.schedule.*
homeassistant.components.scrape.*
homeassistant.components.select.*
homeassistant.components.senseme.*
homeassistant.components.sensibo.*
homeassistant.components.sensirion_ble.*
homeassistant.components.sensor.*
@@ -308,6 +309,7 @@ homeassistant.components.tag.*
homeassistant.components.tailscale.*
homeassistant.components.tautulli.*
homeassistant.components.tcp.*
homeassistant.components.text.*
homeassistant.components.threshold.*
homeassistant.components.tibber.*
homeassistant.components.tile.*

View File

@@ -275,6 +275,8 @@ build.json @home-assistant/supervisor
/homeassistant/components/discogs/ @thibmaek
/homeassistant/components/discord/ @tkdrob
/tests/components/discord/ @tkdrob
/homeassistant/components/discovergy/ @jpbede
/tests/components/discovergy/ @jpbede
/homeassistant/components/discovery/ @home-assistant/core
/tests/components/discovery/ @home-assistant/core
/homeassistant/components/dlink/ @tkdrob
@@ -289,6 +291,8 @@ build.json @home-assistant/supervisor
/tests/components/doorbird/ @oblogic7 @bdraco @flacjacket
/homeassistant/components/dormakaba_dkey/ @emontnemery
/tests/components/dormakaba_dkey/ @emontnemery
/homeassistant/components/dremel_3d_printer/ @tkdrob
/tests/components/dremel_3d_printer/ @tkdrob
/homeassistant/components/dsmr/ @Robbie1221 @frenck
/tests/components/dsmr/ @Robbie1221 @frenck
/homeassistant/components/dsmr_reader/ @depl0y @glodenox
@@ -352,8 +356,8 @@ build.json @home-assistant/supervisor
/homeassistant/components/eq3btsmart/ @rytilahti
/homeassistant/components/escea/ @lazdavila
/tests/components/escea/ @lazdavila
/homeassistant/components/esphome/ @OttoWinter @jesserockz
/tests/components/esphome/ @OttoWinter @jesserockz
/homeassistant/components/esphome/ @OttoWinter @jesserockz @bdraco
/tests/components/esphome/ @OttoWinter @jesserockz @bdraco
/homeassistant/components/eufylife_ble/ @bdr99
/tests/components/eufylife_ble/ @bdr99
/homeassistant/components/evil_genius_labs/ @balloob
@@ -448,8 +452,8 @@ build.json @home-assistant/supervisor
/tests/components/glances/ @engrbm87
/homeassistant/components/goalzero/ @tkdrob
/tests/components/goalzero/ @tkdrob
/homeassistant/components/gogogate2/ @vangorra @bdraco
/tests/components/gogogate2/ @vangorra @bdraco
/homeassistant/components/gogogate2/ @vangorra
/tests/components/gogogate2/ @vangorra
/homeassistant/components/goodwe/ @mletenay @starkillerOG
/tests/components/goodwe/ @mletenay @starkillerOG
/homeassistant/components/google/ @allenporter
@@ -559,12 +563,14 @@ build.json @home-assistant/supervisor
/tests/components/icloud/ @Quentame @nzapponi
/homeassistant/components/ign_sismologia/ @exxamalte
/tests/components/ign_sismologia/ @exxamalte
/homeassistant/components/image/ @home-assistant/core
/tests/components/image/ @home-assistant/core
/homeassistant/components/image_processing/ @home-assistant/core
/tests/components/image_processing/ @home-assistant/core
/homeassistant/components/image_upload/ @home-assistant/core
/tests/components/image_upload/ @home-assistant/core
/homeassistant/components/imap/ @engrbm87 @jbouwh
/tests/components/imap/ @engrbm87 @jbouwh
/homeassistant/components/imap/ @jbouwh
/tests/components/imap/ @jbouwh
/homeassistant/components/incomfort/ @zxdavb
/homeassistant/components/influxdb/ @mdegat01
/tests/components/influxdb/ @mdegat01
@@ -697,6 +703,8 @@ build.json @home-assistant/supervisor
/tests/components/logi_circle/ @evanjd
/homeassistant/components/lookin/ @ANMalko @bdraco
/tests/components/lookin/ @ANMalko @bdraco
/homeassistant/components/loqed/ @mikewoudenberg
/tests/components/loqed/ @mikewoudenberg
/homeassistant/components/lovelace/ @home-assistant/frontend
/tests/components/lovelace/ @home-assistant/frontend
/homeassistant/components/luci/ @mzdrale
@@ -779,11 +787,12 @@ build.json @home-assistant/supervisor
/tests/components/mutesync/ @currentoor
/homeassistant/components/my/ @home-assistant/core
/tests/components/my/ @home-assistant/core
/homeassistant/components/myq/ @bdraco @ehendrix23
/tests/components/myq/ @bdraco @ehendrix23
/homeassistant/components/myq/ @ehendrix23
/tests/components/myq/ @ehendrix23
/homeassistant/components/mysensors/ @MartinHjelmare @functionpointer
/tests/components/mysensors/ @MartinHjelmare @functionpointer
/homeassistant/components/mystrom/ @fabaff
/tests/components/mystrom/ @fabaff
/homeassistant/components/nam/ @bieniu
/tests/components/nam/ @bieniu
/homeassistant/components/nanoleaf/ @milanmeu
@@ -878,6 +887,7 @@ build.json @home-assistant/supervisor
/homeassistant/components/opengarage/ @danielhiversen
/tests/components/opengarage/ @danielhiversen
/homeassistant/components/openhome/ @bazwilliams
/tests/components/openhome/ @bazwilliams
/homeassistant/components/opensky/ @joostlek
/homeassistant/components/opentherm_gw/ @mvn23
/tests/components/opentherm_gw/ @mvn23
@@ -961,6 +971,8 @@ build.json @home-assistant/supervisor
/tests/components/qingping/ @bdraco @skgsergio
/homeassistant/components/qld_bushfire/ @exxamalte
/tests/components/qld_bushfire/ @exxamalte
/homeassistant/components/qnap/ @disforw
/tests/components/qnap/ @disforw
/homeassistant/components/qnap_qsw/ @Noltari
/tests/components/qnap_qsw/ @Noltari
/homeassistant/components/quantum_gateway/ @cisasteelersfan
@@ -999,6 +1011,8 @@ build.json @home-assistant/supervisor
/tests/components/remote/ @home-assistant/core
/homeassistant/components/renault/ @epenet
/tests/components/renault/ @epenet
/homeassistant/components/renson/ @jimmyd-be
/tests/components/renson/ @jimmyd-be
/homeassistant/components/reolink/ @starkillerOG
/tests/components/reolink/ @starkillerOG
/homeassistant/components/repairs/ @home-assistant/core
@@ -1068,8 +1082,6 @@ build.json @home-assistant/supervisor
/tests/components/select/ @home-assistant/core
/homeassistant/components/sense/ @kbickar
/tests/components/sense/ @kbickar
/homeassistant/components/senseme/ @mikelawrence @bdraco
/tests/components/senseme/ @mikelawrence @bdraco
/homeassistant/components/sensibo/ @andrey-git @gjohansson-ST
/tests/components/sensibo/ @andrey-git @gjohansson-ST
/homeassistant/components/sensirion_ble/ @akx
@@ -1292,6 +1304,8 @@ build.json @home-assistant/supervisor
/tests/components/twentemilieu/ @frenck
/homeassistant/components/twinkly/ @dr1rrb @Robbie1221
/tests/components/twinkly/ @dr1rrb @Robbie1221
/homeassistant/components/twitch/ @joostlek
/tests/components/twitch/ @joostlek
/homeassistant/components/ukraine_alarm/ @PaulAnnekov
/tests/components/ukraine_alarm/ @PaulAnnekov
/homeassistant/components/unifi/ @Kane610

View File

@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/vscode/devcontainers/python:0-3.10
FROM mcr.microsoft.com/vscode/devcontainers/python:0-3.11
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

View File

@@ -21,7 +21,7 @@ If you run into issues while using Home Assistant or during development
of a component, check the `Home Assistant help section <https://home-assistant.io/help/>`__ of our website for further help and information.
.. |Chat Status| image:: https://img.shields.io/discord/330944238910963714.svg
:target: https://discord.gg/c5DvZ4e
:target: https://www.home-assistant.io/join-chat/
.. |screenshot-states| image:: https://raw.githubusercontent.com/home-assistant/core/master/docs/screenshots.png
:target: https://demo.home-assistant.io
.. |screenshot-integrations| image:: https://raw.githubusercontent.com/home-assistant/core/dev/docs/screenshot-integrations.png

View File

@@ -1,14 +1,16 @@
image: homeassistant/{arch}-homeassistant
shadow_repository: ghcr.io/home-assistant
image: ghcr.io/home-assistant/{arch}-homeassistant
build_from:
aarch64: ghcr.io/home-assistant/aarch64-homeassistant-base:2023.05.0
armhf: ghcr.io/home-assistant/armhf-homeassistant-base:2023.05.0
armv7: ghcr.io/home-assistant/armv7-homeassistant-base:2023.05.0
amd64: ghcr.io/home-assistant/amd64-homeassistant-base:2023.05.0
i386: ghcr.io/home-assistant/i386-homeassistant-base:2023.05.0
aarch64: ghcr.io/home-assistant/aarch64-homeassistant-base:2023.06.1
armhf: ghcr.io/home-assistant/armhf-homeassistant-base:2023.06.1
armv7: ghcr.io/home-assistant/armv7-homeassistant-base:2023.06.1
amd64: ghcr.io/home-assistant/amd64-homeassistant-base:2023.06.1
i386: ghcr.io/home-assistant/i386-homeassistant-base:2023.06.1
codenotary:
signer: notary@home-assistant.io
base_image: notary@home-assistant.io
cosign:
base_identity: https://github.com/home-assistant/docker/.*
identity: https://github.com/home-assistant/core/.*
labels:
io.hass.type: core
org.opencontainers.image.title: Home Assistant

View File

@@ -13,8 +13,8 @@ from homeassistant.const import CONF_COMMAND
from homeassistant.data_entry_flow import FlowResult
from homeassistant.exceptions import HomeAssistantError
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
from ..models import Credentials, UserMeta
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
CONF_ARGS = "args"
CONF_META = "meta"

View File

@@ -16,8 +16,8 @@ from homeassistant.data_entry_flow import FlowResult
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.storage import Store
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
from ..models import Credentials, UserMeta
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
STORAGE_VERSION = 1
STORAGE_KEY = "auth_provider.homeassistant"

View File

@@ -11,8 +11,8 @@ from homeassistant.core import callback
from homeassistant.data_entry_flow import FlowResult
from homeassistant.exceptions import HomeAssistantError
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
from ..models import Credentials, UserMeta
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
USER_SCHEMA = vol.Schema(
{

View File

@@ -15,8 +15,8 @@ from homeassistant.data_entry_flow import FlowResult
from homeassistant.exceptions import HomeAssistantError
import homeassistant.helpers.config_validation as cv
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
from ..models import Credentials, UserMeta
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
AUTH_PROVIDER_TYPE = "legacy_api_password"
CONF_API_PASSWORD = "api_password"

View File

@@ -23,9 +23,9 @@ from homeassistant.data_entry_flow import FlowResult
from homeassistant.exceptions import HomeAssistantError
import homeassistant.helpers.config_validation as cv
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
from .. import InvalidAuthError
from ..models import Credentials, RefreshToken, UserMeta
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlow
IPAddress = IPv4Address | IPv6Address
IPNetwork = IPv4Network | IPv6Network

View File

@@ -0,0 +1,72 @@
"""Functools backports from standard lib."""
from __future__ import annotations
from collections.abc import Callable
from types import GenericAlias
from typing import Any, Generic, TypeVar, overload
from typing_extensions import Self
_T = TypeVar("_T")
_R = TypeVar("_R")
class cached_property(Generic[_T, _R]): # pylint: disable=invalid-name
"""Backport of Python 3.12's cached_property.
Includes https://github.com/python/cpython/pull/101890/files
"""
def __init__(self, func: Callable[[_T], _R]) -> None:
"""Initialize."""
self.func = func
self.attrname: Any = None
self.__doc__ = func.__doc__
def __set_name__(self, owner: type[_T], name: str) -> None:
"""Set name."""
if self.attrname is None:
self.attrname = name
elif name != self.attrname:
raise TypeError(
"Cannot assign the same cached_property to two different names "
f"({self.attrname!r} and {name!r})."
)
@overload
def __get__(self, instance: None, owner: type[_T]) -> Self:
...
@overload
def __get__(self, instance: _T, owner: type[_T]) -> _R:
...
def __get__(self, instance: _T | None, owner: type[_T] | None = None) -> _R | Self:
"""Get."""
if instance is None:
return self
if self.attrname is None:
raise TypeError(
"Cannot use cached_property instance without calling __set_name__ on it."
)
try:
cache = instance.__dict__
# not all objects have __dict__ (e.g. class defines slots)
except AttributeError:
msg = (
f"No '__dict__' attribute on {type(instance).__name__!r} "
f"instance to cache {self.attrname!r} property."
)
raise TypeError(msg) from None
val = self.func(instance)
try:
cache[self.attrname] = val
except TypeError:
msg = (
f"The '__dict__' attribute on {type(instance).__name__!r} instance "
f"does not support item assignment for caching {self.attrname!r} property."
)
raise TypeError(msg) from None
return val
__class_getitem__ = classmethod(GenericAlias)

View File

@@ -391,6 +391,7 @@ def async_enable_logging(
logging.getLogger("requests").setLevel(logging.WARNING)
logging.getLogger("urllib3").setLevel(logging.WARNING)
logging.getLogger("aiohttp.access").setLevel(logging.WARNING)
logging.getLogger("httpx").setLevel(logging.WARNING)
sys.excepthook = lambda *args: logging.getLogger(None).exception(
"Uncaught exception", exc_info=args # type: ignore[arg-type]

View File

@@ -42,6 +42,7 @@ async def async_setup_entry(
class AbodeBinarySensor(AbodeDevice, BinarySensorEntity):
"""A binary sensor implementation for Abode device."""
_attr_name = None
_device: ABBinarySensor
@property

View File

@@ -12,6 +12,7 @@ from homeassistant.components.sensor import (
SensorEntityDescription,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import LIGHT_LUX
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
@@ -21,17 +22,14 @@ from .const import DOMAIN
SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
SensorEntityDescription(
key=CONST.TEMP_STATUS_KEY,
name="Temperature",
device_class=SensorDeviceClass.TEMPERATURE,
),
SensorEntityDescription(
key=CONST.HUMI_STATUS_KEY,
name="Humidity",
device_class=SensorDeviceClass.HUMIDITY,
),
SensorEntityDescription(
key=CONST.LUX_STATUS_KEY,
name="Lux",
device_class=SensorDeviceClass.ILLUMINANCE,
),
)
@@ -55,6 +53,7 @@ class AbodeSensor(AbodeDevice, SensorEntity):
"""A sensor implementation for Abode devices."""
_device: AbodeSense
_attr_has_entity_name = True
def __init__(
self,
@@ -71,7 +70,7 @@ class AbodeSensor(AbodeDevice, SensorEntity):
elif description.key == CONST.HUMI_STATUS_KEY:
self._attr_native_unit_of_measurement = device.humidity_unit
elif description.key == CONST.LUX_STATUS_KEY:
self._attr_native_unit_of_measurement = device.lux_unit
self._attr_native_unit_of_measurement = LIGHT_LUX
@property
def native_value(self) -> float | None:

View File

@@ -4,10 +4,13 @@ from __future__ import annotations
from typing import cast
from homeassistant.components.weather import (
ATTR_FORECAST_CLOUD_COVERAGE,
ATTR_FORECAST_CONDITION,
ATTR_FORECAST_NATIVE_APPARENT_TEMP,
ATTR_FORECAST_NATIVE_PRECIPITATION,
ATTR_FORECAST_NATIVE_TEMP,
ATTR_FORECAST_NATIVE_TEMP_LOW,
ATTR_FORECAST_NATIVE_WIND_GUST_SPEED,
ATTR_FORECAST_NATIVE_WIND_SPEED,
ATTR_FORECAST_PRECIPITATION_PROBABILITY,
ATTR_FORECAST_TIME,
@@ -29,7 +32,16 @@ from homeassistant.helpers.update_coordinator import CoordinatorEntity
from homeassistant.util.dt import utc_from_timestamp
from . import AccuWeatherDataUpdateCoordinator
from .const import API_METRIC, ATTR_FORECAST, ATTRIBUTION, CONDITION_CLASSES, DOMAIN
from .const import (
API_METRIC,
ATTR_DIRECTION,
ATTR_FORECAST,
ATTR_SPEED,
ATTR_VALUE,
ATTRIBUTION,
CONDITION_CLASSES,
DOMAIN,
)
PARALLEL_UPDATES = 1
@@ -50,6 +62,7 @@ class AccuWeatherEntity(
"""Define an AccuWeather entity."""
_attr_has_entity_name = True
_attr_name = None
def __init__(self, coordinator: AccuWeatherDataUpdateCoordinator) -> None:
"""Initialize."""
@@ -78,35 +91,61 @@ class AccuWeatherEntity(
except IndexError:
return None
@property
def cloud_coverage(self) -> float:
"""Return the Cloud coverage in %."""
return cast(float, self.coordinator.data["CloudCover"])
@property
def native_apparent_temperature(self) -> float:
"""Return the apparent temperature."""
return cast(
float, self.coordinator.data["ApparentTemperature"][API_METRIC][ATTR_VALUE]
)
@property
def native_temperature(self) -> float:
"""Return the temperature."""
return cast(float, self.coordinator.data["Temperature"][API_METRIC]["Value"])
return cast(float, self.coordinator.data["Temperature"][API_METRIC][ATTR_VALUE])
@property
def native_pressure(self) -> float:
"""Return the pressure."""
return cast(float, self.coordinator.data["Pressure"][API_METRIC]["Value"])
return cast(float, self.coordinator.data["Pressure"][API_METRIC][ATTR_VALUE])
@property
def native_dew_point(self) -> float:
"""Return the dew point."""
return cast(float, self.coordinator.data["DewPoint"][API_METRIC][ATTR_VALUE])
@property
def humidity(self) -> int:
"""Return the humidity."""
return cast(int, self.coordinator.data["RelativeHumidity"])
@property
def native_wind_gust_speed(self) -> float:
"""Return the wind gust speed."""
return cast(
float, self.coordinator.data["WindGust"][ATTR_SPEED][API_METRIC][ATTR_VALUE]
)
@property
def native_wind_speed(self) -> float:
"""Return the wind speed."""
return cast(float, self.coordinator.data["Wind"]["Speed"][API_METRIC]["Value"])
return cast(
float, self.coordinator.data["Wind"][ATTR_SPEED][API_METRIC][ATTR_VALUE]
)
@property
def wind_bearing(self) -> int:
"""Return the wind bearing."""
return cast(int, self.coordinator.data["Wind"]["Direction"]["Degrees"])
return cast(int, self.coordinator.data["Wind"][ATTR_DIRECTION]["Degrees"])
@property
def native_visibility(self) -> float:
"""Return the visibility."""
return cast(float, self.coordinator.data["Visibility"][API_METRIC]["Value"])
return cast(float, self.coordinator.data["Visibility"][API_METRIC][ATTR_VALUE])
@property
def forecast(self) -> list[Forecast] | None:
@@ -117,14 +156,23 @@ class AccuWeatherEntity(
return [
{
ATTR_FORECAST_TIME: utc_from_timestamp(item["EpochDate"]).isoformat(),
ATTR_FORECAST_NATIVE_TEMP: item["TemperatureMax"]["Value"],
ATTR_FORECAST_NATIVE_TEMP_LOW: item["TemperatureMin"]["Value"],
ATTR_FORECAST_NATIVE_PRECIPITATION: item["TotalLiquidDay"]["Value"],
ATTR_FORECAST_CLOUD_COVERAGE: item["CloudCoverDay"],
ATTR_FORECAST_NATIVE_TEMP: item["TemperatureMax"][ATTR_VALUE],
ATTR_FORECAST_NATIVE_TEMP_LOW: item["TemperatureMin"][ATTR_VALUE],
ATTR_FORECAST_NATIVE_APPARENT_TEMP: item["RealFeelTemperatureMax"][
ATTR_VALUE
],
ATTR_FORECAST_NATIVE_PRECIPITATION: item["TotalLiquidDay"][ATTR_VALUE],
ATTR_FORECAST_PRECIPITATION_PROBABILITY: item[
"PrecipitationProbabilityDay"
],
ATTR_FORECAST_NATIVE_WIND_SPEED: item["WindDay"]["Speed"]["Value"],
ATTR_FORECAST_WIND_BEARING: item["WindDay"]["Direction"]["Degrees"],
ATTR_FORECAST_NATIVE_WIND_SPEED: item["WindDay"][ATTR_SPEED][
ATTR_VALUE
],
ATTR_FORECAST_NATIVE_WIND_GUST_SPEED: item["WindGustDay"][ATTR_SPEED][
ATTR_VALUE
],
ATTR_FORECAST_WIND_BEARING: item["WindDay"][ATTR_DIRECTION]["Degrees"],
ATTR_FORECAST_CONDITION: [
k for k, v in CONDITION_CLASSES.items() if item["IconDay"] in v
][0],

View File

@@ -14,6 +14,7 @@ class AcmedaBase(entity.Entity):
"""Base representation of an Acmeda roller."""
_attr_should_poll = False
_attr_has_entity_name = True
def __init__(self, roller: aiopulse.Roller) -> None:
"""Initialize the roller."""
@@ -72,11 +73,6 @@ class AcmedaBase(entity.Entity):
"""Return the ID of this roller."""
return self.roller.id
@property
def name(self) -> str | None:
"""Return the name of roller."""
return self.roller.name
@property
def device_info(self) -> entity.DeviceInfo:
"""Return the device info."""

View File

@@ -45,7 +45,9 @@ async def async_setup_entry(
class AcmedaCover(AcmedaBase, CoverEntity):
"""Representation of a Acmeda cover device."""
"""Representation of an Acmeda cover device."""
_attr_name = None
@property
def current_cover_position(self) -> int | None:

View File

@@ -40,16 +40,11 @@ async def async_setup_entry(
class AcmedaBattery(AcmedaBase, SensorEntity):
"""Representation of a Acmeda cover device."""
"""Representation of an Acmeda cover sensor."""
_attr_device_class = SensorDeviceClass.BATTERY
_attr_native_unit_of_measurement = PERCENTAGE
@property
def name(self) -> str:
"""Return the name of roller."""
return f"{super().name} Battery"
@property
def native_value(self) -> float | int | None:
"""Return the state of the device."""

View File

@@ -1,7 +1,7 @@
"""Support for Adax wifi-enabled home heaters."""
from __future__ import annotations
from typing import Any
from typing import Any, cast
from adax import Adax
from adax_local import Adax as AdaxLocal
@@ -79,7 +79,10 @@ class AdaxDevice(ClimateEntity):
self._attr_unique_id = f"{heater_data['homeId']}_{heater_data['id']}"
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, heater_data["id"])},
name=self.name,
# Instead of setting the device name to the entity name, adax
# should be updated to set has_entity_name = True, and set the entity
# name to None
name=cast(str | None, self.name),
manufacturer="Adax",
)

View File

@@ -39,56 +39,56 @@ class AdGuardHomeEntityDescription(
SENSORS: tuple[AdGuardHomeEntityDescription, ...] = (
AdGuardHomeEntityDescription(
key="dns_queries",
name="DNS queries",
translation_key="dns_queries",
icon="mdi:magnify",
native_unit_of_measurement="queries",
value_fn=lambda adguard: adguard.stats.dns_queries(),
),
AdGuardHomeEntityDescription(
key="blocked_filtering",
name="DNS queries blocked",
translation_key="dns_queries_blocked",
icon="mdi:magnify-close",
native_unit_of_measurement="queries",
value_fn=lambda adguard: adguard.stats.blocked_filtering(),
),
AdGuardHomeEntityDescription(
key="blocked_percentage",
name="DNS queries blocked ratio",
translation_key="dns_queries_blocked_ratio",
icon="mdi:magnify-close",
native_unit_of_measurement=PERCENTAGE,
value_fn=lambda adguard: adguard.stats.blocked_percentage(),
),
AdGuardHomeEntityDescription(
key="blocked_parental",
name="Parental control blocked",
translation_key="parental_control_blocked",
icon="mdi:human-male-girl",
native_unit_of_measurement="requests",
value_fn=lambda adguard: adguard.stats.replaced_parental(),
),
AdGuardHomeEntityDescription(
key="blocked_safebrowsing",
name="Safe browsing blocked",
translation_key="safe_browsing_blocked",
icon="mdi:shield-half-full",
native_unit_of_measurement="requests",
value_fn=lambda adguard: adguard.stats.replaced_safebrowsing(),
),
AdGuardHomeEntityDescription(
key="enforced_safesearch",
name="Safe searches enforced",
translation_key="safe_searches_enforced",
icon="mdi:shield-search",
native_unit_of_measurement="requests",
value_fn=lambda adguard: adguard.stats.replaced_safesearch(),
),
AdGuardHomeEntityDescription(
key="average_speed",
name="Average processing speed",
translation_key="average_processing_speed",
icon="mdi:speedometer",
native_unit_of_measurement=UnitOfTime.MILLISECONDS,
value_fn=lambda adguard: adguard.stats.avg_processing_time(),
),
AdGuardHomeEntityDescription(
key="rules_count",
name="Rules count",
translation_key="rules_count",
icon="mdi:counter",
native_unit_of_measurement="rules",
value_fn=lambda adguard: adguard.filtering.rules_count(allowlist=False),

View File

@@ -24,5 +24,53 @@
"existing_instance_updated": "Updated existing configuration.",
"already_configured": "[%key:common::config_flow::abort::already_configured_service%]"
}
},
"entity": {
"sensor": {
"dns_queries": {
"name": "DNS queries"
},
"dns_queries_blocked": {
"name": "DNS queries blocked"
},
"dns_queries_blocked_ratio": {
"name": "DNS queries blocked ratio"
},
"parental_control_blocked": {
"name": "Parental control blocked"
},
"safe_browsing_blocked": {
"name": "Safe browsing blocked"
},
"safe_searches_enforced": {
"name": "Safe searches enforced"
},
"average_processing_speed": {
"name": "Average processing speed"
},
"rules_count": {
"name": "Rules count"
}
},
"switch": {
"protection": {
"name": "Protection"
},
"parental": {
"name": "Parental control"
},
"safe_search": {
"name": "Safe search"
},
"safe_browsing": {
"name": "Safe browsing"
},
"filtering": {
"name": "Filtering"
},
"query_log": {
"name": "Query log"
}
}
}
}

View File

@@ -40,7 +40,7 @@ class AdGuardHomeSwitchEntityDescription(
SWITCHES: tuple[AdGuardHomeSwitchEntityDescription, ...] = (
AdGuardHomeSwitchEntityDescription(
key="protection",
name="Protection",
translation_key="protection",
icon="mdi:shield-check",
is_on_fn=lambda adguard: adguard.protection_enabled,
turn_on_fn=lambda adguard: adguard.enable_protection,
@@ -48,7 +48,7 @@ SWITCHES: tuple[AdGuardHomeSwitchEntityDescription, ...] = (
),
AdGuardHomeSwitchEntityDescription(
key="parental",
name="Parental control",
translation_key="parental",
icon="mdi:shield-check",
is_on_fn=lambda adguard: adguard.parental.enabled,
turn_on_fn=lambda adguard: adguard.parental.enable,
@@ -56,7 +56,7 @@ SWITCHES: tuple[AdGuardHomeSwitchEntityDescription, ...] = (
),
AdGuardHomeSwitchEntityDescription(
key="safesearch",
name="Safe search",
translation_key="safe_search",
icon="mdi:shield-check",
is_on_fn=lambda adguard: adguard.safesearch.enabled,
turn_on_fn=lambda adguard: adguard.safesearch.enable,
@@ -64,7 +64,7 @@ SWITCHES: tuple[AdGuardHomeSwitchEntityDescription, ...] = (
),
AdGuardHomeSwitchEntityDescription(
key="safebrowsing",
name="Safe browsing",
translation_key="safe_browsing",
icon="mdi:shield-check",
is_on_fn=lambda adguard: adguard.safebrowsing.enabled,
turn_on_fn=lambda adguard: adguard.safebrowsing.enable,
@@ -72,7 +72,7 @@ SWITCHES: tuple[AdGuardHomeSwitchEntityDescription, ...] = (
),
AdGuardHomeSwitchEntityDescription(
key="filtering",
name="Filtering",
translation_key="filtering",
icon="mdi:shield-check",
is_on_fn=lambda adguard: adguard.filtering.enabled,
turn_on_fn=lambda adguard: adguard.filtering.enable,
@@ -80,7 +80,7 @@ SWITCHES: tuple[AdGuardHomeSwitchEntityDescription, ...] = (
),
AdGuardHomeSwitchEntityDescription(
key="querylog",
name="Query log",
translation_key="query_log",
icon="mdi:shield-check",
is_on_fn=lambda adguard: adguard.querylog.enabled,
turn_on_fn=lambda adguard: adguard.querylog.enable,

View File

@@ -10,6 +10,7 @@ import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType, StateType
from .. import ads
from . import (
ADS_TYPEMAP,
CONF_ADS_FACTOR,
@@ -18,7 +19,6 @@ from . import (
STATE_KEY_STATE,
AdsEntity,
)
from .. import ads
DEFAULT_NAME = "ADS sensor"
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(

View File

@@ -7,5 +7,5 @@
"iot_class": "local_polling",
"loggers": ["advantage_air"],
"quality_scale": "platinum",
"requirements": ["advantage_air==0.4.4"]
"requirements": ["advantage-air==0.4.4"]
}

View File

@@ -80,7 +80,6 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
AirlySensorEntityDescription(
key=ATTR_API_PM1,
device_class=SensorDeviceClass.PM1,
translation_key="pm1",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=0,
@@ -88,7 +87,6 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
AirlySensorEntityDescription(
key=ATTR_API_PM25,
device_class=SensorDeviceClass.PM25,
translation_key="pm25",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=0,
@@ -100,7 +98,6 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
AirlySensorEntityDescription(
key=ATTR_API_PM10,
device_class=SensorDeviceClass.PM10,
translation_key="pm10",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=0,
@@ -112,7 +109,6 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
AirlySensorEntityDescription(
key=ATTR_API_HUMIDITY,
device_class=SensorDeviceClass.HUMIDITY,
translation_key="humidity",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=1,
@@ -120,7 +116,6 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
AirlySensorEntityDescription(
key=ATTR_API_PRESSURE,
device_class=SensorDeviceClass.PRESSURE,
translation_key="pressure",
native_unit_of_measurement=UnitOfPressure.HPA,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=0,
@@ -128,7 +123,6 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
AirlySensorEntityDescription(
key=ATTR_API_TEMPERATURE,
device_class=SensorDeviceClass.TEMPERATURE,
translation_key="temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=1,
@@ -147,7 +141,6 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
AirlySensorEntityDescription(
key=ATTR_API_NO2,
device_class=SensorDeviceClass.NITROGEN_DIOXIDE,
translation_key="no2",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=0,
@@ -159,7 +152,6 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
AirlySensorEntityDescription(
key=ATTR_API_SO2,
device_class=SensorDeviceClass.SULPHUR_DIOXIDE,
translation_key="so2",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=0,
@@ -171,7 +163,6 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
AirlySensorEntityDescription(
key=ATTR_API_O3,
device_class=SensorDeviceClass.OZONE,
translation_key="o3",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=0,

View File

@@ -32,35 +32,8 @@
"caqi": {
"name": "Common air quality index"
},
"pm1": {
"name": "[%key:component::sensor::entity_component::pm1::name%]"
},
"pm25": {
"name": "[%key:component::sensor::entity_component::pm25::name%]"
},
"pm10": {
"name": "[%key:component::sensor::entity_component::pm10::name%]"
},
"humidity": {
"name": "[%key:component::sensor::entity_component::humidity::name%]"
},
"pressure": {
"name": "[%key:component::sensor::entity_component::pressure::name%]"
},
"temperature": {
"name": "[%key:component::sensor::entity_component::temperature::name%]"
},
"co": {
"name": "[%key:component::sensor::entity_component::carbon_monoxide::name%]"
},
"no2": {
"name": "[%key:component::sensor::entity_component::nitrogen_dioxide::name%]"
},
"so2": {
"name": "[%key:component::sensor::entity_component::sulphur_dioxide::name%]"
},
"o3": {
"name": "[%key:component::sensor::entity_component::ozone::name%]"
}
}
}

View File

@@ -17,5 +17,3 @@ ATTR_API_STATION_LATITUDE = "Latitude"
ATTR_API_STATION_LONGITUDE = "Longitude"
DEFAULT_NAME = "AirNow"
DOMAIN = "airnow"
SENSOR_AQI_ATTR_DESCR = "description"
SENSOR_AQI_ATTR_LEVEL = "level"

View File

@@ -1,7 +1,12 @@
"""Support for the AirNow sensor service."""
from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from typing import Any
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
SensorEntityDescription,
SensorStateClass,
@@ -12,7 +17,10 @@ from homeassistant.const import (
CONCENTRATION_PARTS_PER_MILLION,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.device_registry import DeviceEntryType
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.typing import StateType
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from . import AirNowDataUpdateCoordinator
@@ -22,36 +30,60 @@ from .const import (
ATTR_API_AQI_LEVEL,
ATTR_API_O3,
ATTR_API_PM25,
DEFAULT_NAME,
DOMAIN,
SENSOR_AQI_ATTR_DESCR,
SENSOR_AQI_ATTR_LEVEL,
)
ATTRIBUTION = "Data provided by AirNow"
PARALLEL_UPDATES = 1
SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
SensorEntityDescription(
ATTR_DESCR = "description"
ATTR_LEVEL = "level"
@dataclass
class AirNowEntityDescriptionMixin:
"""Mixin for required keys."""
value_fn: Callable[[Any], StateType]
extra_state_attributes_fn: Callable[[Any], dict[str, str]] | None
@dataclass
class AirNowEntityDescription(SensorEntityDescription, AirNowEntityDescriptionMixin):
"""Describes Airnow sensor entity."""
SENSOR_TYPES: tuple[AirNowEntityDescription, ...] = (
AirNowEntityDescription(
key=ATTR_API_AQI,
icon="mdi:blur",
name=ATTR_API_AQI,
native_unit_of_measurement="aqi",
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.AQI,
value_fn=lambda data: data.get(ATTR_API_AQI),
extra_state_attributes_fn=lambda data: {
ATTR_DESCR: data[ATTR_API_AQI_DESCRIPTION],
ATTR_LEVEL: data[ATTR_API_AQI_LEVEL],
},
),
SensorEntityDescription(
AirNowEntityDescription(
key=ATTR_API_PM25,
icon="mdi:blur",
name=ATTR_API_PM25,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.PM25,
value_fn=lambda data: data.get(ATTR_API_PM25),
extra_state_attributes_fn=None,
),
SensorEntityDescription(
AirNowEntityDescription(
key=ATTR_API_O3,
translation_key="o3",
icon="mdi:blur",
name=ATTR_API_O3,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION,
state_class=SensorStateClass.MEASUREMENT,
value_fn=lambda data: data.get(ATTR_API_O3),
extra_state_attributes_fn=None,
),
)
@@ -73,38 +105,38 @@ class AirNowSensor(CoordinatorEntity[AirNowDataUpdateCoordinator], SensorEntity)
"""Define an AirNow sensor."""
_attr_attribution = ATTRIBUTION
_attr_has_entity_name = True
entity_description: AirNowEntityDescription
def __init__(
self,
coordinator: AirNowDataUpdateCoordinator,
description: SensorEntityDescription,
description: AirNowEntityDescription,
) -> None:
"""Initialize."""
super().__init__(coordinator)
self.entity_description = description
self._state = None
self._attrs: dict[str, str] = {}
self._attr_name = f"AirNow {description.name}"
self._attr_unique_id = (
f"{coordinator.latitude}-{coordinator.longitude}-{description.key.lower()}"
)
self._attr_device_info = DeviceInfo(
entry_type=DeviceEntryType.SERVICE,
identifiers={(DOMAIN, self._attr_unique_id)},
manufacturer=DEFAULT_NAME,
name=DEFAULT_NAME,
)
@property
def native_value(self):
def native_value(self) -> StateType:
"""Return the state."""
self._state = self.coordinator.data.get(self.entity_description.key)
return self._state
return self.entity_description.value_fn(self.coordinator.data)
@property
def extra_state_attributes(self):
def extra_state_attributes(self) -> dict[str, str] | None:
"""Return the state attributes."""
if self.entity_description.key == ATTR_API_AQI:
self._attrs[SENSOR_AQI_ATTR_DESCR] = self.coordinator.data[
ATTR_API_AQI_DESCRIPTION
]
self._attrs[SENSOR_AQI_ATTR_LEVEL] = self.coordinator.data[
ATTR_API_AQI_LEVEL
]
return self._attrs
if self.entity_description.extra_state_attributes_fn:
return self.entity_description.extra_state_attributes_fn(
self.coordinator.data
)
return None

View File

@@ -20,5 +20,12 @@
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
}
},
"entity": {
"sensor": {
"o3": {
"name": "[%key:component::sensor::entity_component::ozone::name%]"
}
}
}
}

View File

@@ -53,63 +53,62 @@ class AirQEntityDescription(SensorEntityDescription, AirQEntityDescriptionMixin)
SENSOR_TYPES: list[AirQEntityDescription] = [
AirQEntityDescription(
key="c2h4o",
name="Acetaldehyde",
translation_key="acetaldehyde",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("c2h4o"),
),
AirQEntityDescription(
key="nh3_MR100",
name="Ammonia",
translation_key="ammonia",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("nh3_MR100"),
),
AirQEntityDescription(
key="ash3",
name="Arsine",
translation_key="arsine",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("ash3"),
),
AirQEntityDescription(
key="br2",
name="Bromine",
translation_key="bromine",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("br2"),
),
AirQEntityDescription(
key="ch4s",
name="CH4S",
translation_key="methanethiol",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("ch4s"),
),
AirQEntityDescription(
key="cl2_M20",
name="Chlorine",
translation_key="chlorine",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("cl2_M20"),
),
AirQEntityDescription(
key="clo2",
name="ClO2",
translation_key="chlorine_dioxide",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("clo2"),
),
AirQEntityDescription(
key="co",
name="CO",
translation_key="carbon_monoxide",
native_unit_of_measurement=CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("co"),
),
AirQEntityDescription(
key="co2",
name="CO2",
device_class=SensorDeviceClass.CO2,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION,
state_class=SensorStateClass.MEASUREMENT,
@@ -117,14 +116,14 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="cs2",
name="CS2",
translation_key="carbon_disulfide",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("cs2"),
),
AirQEntityDescription(
key="dewpt",
name="Dew point",
translation_key="dew_point",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("dewpt"),
@@ -132,63 +131,63 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="ethanol",
name="Ethanol",
translation_key="ethanol",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("ethanol"),
),
AirQEntityDescription(
key="c2h4",
name="Ethylene",
translation_key="ethylene",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("c2h4"),
),
AirQEntityDescription(
key="ch2o_M10",
name="Formaldehyde",
translation_key="formaldehyde",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("ch2o_M10"),
),
AirQEntityDescription(
key="f2",
name="Fluorine",
translation_key="fluorine",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("f2"),
),
AirQEntityDescription(
key="h2s",
name="H2S",
translation_key="hydrogen_sulfide",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("h2s"),
),
AirQEntityDescription(
key="hcl",
name="HCl",
translation_key="hydrochloric_acid",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("hcl"),
),
AirQEntityDescription(
key="hcn",
name="HCN",
translation_key="hydrogen_cyanide",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("hcn"),
),
AirQEntityDescription(
key="hf",
name="HF",
translation_key="hydrogen_fluoride",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("hf"),
),
AirQEntityDescription(
key="health",
name="Health Index",
translation_key="health_index",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:heart-pulse",
@@ -196,7 +195,6 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="humidity",
name="Humidity",
device_class=SensorDeviceClass.HUMIDITY,
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
@@ -204,7 +202,7 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="humidity_abs",
name="Absolute humidity",
translation_key="absolute_humidity",
native_unit_of_measurement=CONCENTRATION_GRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("humidity_abs"),
@@ -212,28 +210,27 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="h2_M1000",
name="Hydrogen",
translation_key="hydrogen",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("h2_M1000"),
),
AirQEntityDescription(
key="h2o2",
name="Hydrogen peroxide",
translation_key="hydrogen_peroxide",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("h2o2"),
),
AirQEntityDescription(
key="ch4_MIPEX",
name="Methane",
translation_key="methane",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("ch4_MIPEX"),
),
AirQEntityDescription(
key="n2o",
name="N2O",
device_class=SensorDeviceClass.NITROUS_OXIDE,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
@@ -241,7 +238,6 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="no_M250",
name="NO",
device_class=SensorDeviceClass.NITROGEN_MONOXIDE,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
@@ -249,7 +245,6 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="no2",
name="NO2",
device_class=SensorDeviceClass.NITROGEN_DIOXIDE,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
@@ -257,14 +252,14 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="acid_M100",
name="Organic acid",
translation_key="organic_acid",
native_unit_of_measurement=CONCENTRATION_PARTS_PER_BILLION,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("acid_M100"),
),
AirQEntityDescription(
key="oxygen",
name="Oxygen",
translation_key="oxygen",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("oxygen"),
@@ -272,7 +267,6 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="o3",
name="Ozone",
device_class=SensorDeviceClass.OZONE,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
@@ -280,7 +274,7 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="performance",
name="Performance Index",
translation_key="performance_index",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:head-check",
@@ -288,14 +282,13 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="ph3",
name="PH3",
translation_key="hydrogen_phosphide",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("ph3"),
),
AirQEntityDescription(
key="pm1",
name="PM1",
device_class=SensorDeviceClass.PM1,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
@@ -304,7 +297,6 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="pm2_5",
name="PM2.5",
device_class=SensorDeviceClass.PM25,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
@@ -313,7 +305,6 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="pm10",
name="PM10",
device_class=SensorDeviceClass.PM10,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
@@ -322,7 +313,6 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="pressure",
name="Pressure",
device_class=SensorDeviceClass.PRESSURE,
native_unit_of_measurement=UnitOfPressure.HPA,
state_class=SensorStateClass.MEASUREMENT,
@@ -330,7 +320,7 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="pressure_rel",
name="Relative pressure",
translation_key="relative_pressure",
native_unit_of_measurement=UnitOfPressure.HPA,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("pressure_rel"),
@@ -338,28 +328,27 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="c3h8_MIPEX",
name="Propane",
translation_key="propane",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("c3h8_MIPEX"),
),
AirQEntityDescription(
key="refigerant",
name="Refrigerant",
translation_key="refigerant",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("refigerant"),
),
AirQEntityDescription(
key="sih4",
name="SiH4",
translation_key="silicon_hydride",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("sih4"),
),
AirQEntityDescription(
key="so2",
name="SO2",
device_class=SensorDeviceClass.SULPHUR_DIOXIDE,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
@@ -367,7 +356,7 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="sound",
name="Noise",
translation_key="noise",
native_unit_of_measurement=UnitOfSoundPressure.WEIGHTED_DECIBEL_A,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("sound"),
@@ -375,7 +364,7 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="sound_max",
name="Noise (Maximum)",
translation_key="maximum_noise",
native_unit_of_measurement=UnitOfSoundPressure.WEIGHTED_DECIBEL_A,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("sound_max"),
@@ -383,7 +372,7 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="radon",
name="Radon",
translation_key="radon",
native_unit_of_measurement=ACTIVITY_BECQUEREL_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("radon"),
@@ -391,7 +380,6 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="temperature",
name="Temperature",
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
@@ -399,21 +387,22 @@ SENSOR_TYPES: list[AirQEntityDescription] = [
),
AirQEntityDescription(
key="tvoc",
name="VOC",
device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS_PARTS,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_BILLION,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("tvoc"),
),
AirQEntityDescription(
key="tvoc_ionsc",
name="VOC (Industrial)",
translation_key="industrial_volatile_organic_compounds",
device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS_PARTS,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_BILLION,
state_class=SensorStateClass.MEASUREMENT,
value=lambda data: data.get("tvoc_ionsc"),
),
AirQEntityDescription(
key="virus",
name="Virus Index",
translation_key="virus_index",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:virus-off",

View File

@@ -18,5 +18,117 @@
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
}
},
"entity": {
"sensor": {
"acetaldehyde": {
"name": "Acetaldehyde"
},
"ammonia": {
"name": "Ammonia"
},
"arsine": {
"name": "Arsine"
},
"bromine": {
"name": "Bromine"
},
"methanethiol": {
"name": "Methanethiol"
},
"chlorine": {
"name": "Chlorine"
},
"chlorine_dioxide": {
"name": "Chlorine dioxide"
},
"carbon_disulfide": {
"name": "Carbon disulfide"
},
"carbon_monoxide": {
"name": "[%key:component::sensor::entity_component::carbon_monoxide::name%]"
},
"dew_point": {
"name": "Dew point"
},
"ethanol": {
"name": "Ethanol"
},
"ethylene": {
"name": "Ethylene"
},
"formaldehyde": {
"name": "Formaldehyde"
},
"fluorine": {
"name": "Fluorine"
},
"hydrogen_sulfide": {
"name": "Hydrogen sulfide"
},
"hydrochloric_acid": {
"name": "Hydrochloric acid"
},
"hydrogen_cyanide": {
"name": "Hydrogen cyanide"
},
"hydrogen_fluoride": {
"name": "Hydrogen fluoride"
},
"health_index": {
"name": "Health Index"
},
"absolute_humidity": {
"name": "Absolute humidity"
},
"hydrogen": {
"name": "Hydrogen"
},
"hydrogen_peroxide": {
"name": "Hydrogen peroxide"
},
"methane": {
"name": "Methane"
},
"organic_acid": {
"name": "Organic acid"
},
"oxygen": {
"name": "Oxygen"
},
"performance_index": {
"name": "Performance Index"
},
"hydrogen_phosphide": {
"name": "Hydrogen Phosphide"
},
"relative_pressure": {
"name": "Relative pressure"
},
"propane": {
"name": "Propane"
},
"refigerant": {
"name": "Refrigerant"
},
"silicon_hydride": {
"name": "Silicon Hydride"
},
"noise": {
"name": "Noise"
},
"maximum_noise": {
"name": "Noise (Maximum)"
},
"radon": {
"name": "Radon"
},
"industrial_volatile_organic_compounds": {
"name": "VOCs (Industrial)"
},
"virus_index": {
"name": "Virus Index"
}
}
}
}

View File

@@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/airthings",
"iot_class": "cloud_polling",
"loggers": ["airthings"],
"requirements": ["airthings_cloud==0.1.0"]
"requirements": ["airthings-cloud==0.1.0"]
}

View File

@@ -35,62 +35,56 @@ SENSORS: dict[str, SensorEntityDescription] = {
"radonShortTermAvg": SensorEntityDescription(
key="radonShortTermAvg",
native_unit_of_measurement="Bq/m³",
name="Radon",
translation_key="radon",
),
"temp": SensorEntityDescription(
key="temp",
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
name="Temperature",
),
"humidity": SensorEntityDescription(
key="humidity",
device_class=SensorDeviceClass.HUMIDITY,
native_unit_of_measurement=PERCENTAGE,
name="Humidity",
),
"pressure": SensorEntityDescription(
key="pressure",
device_class=SensorDeviceClass.PRESSURE,
native_unit_of_measurement=UnitOfPressure.MBAR,
name="Pressure",
),
"battery": SensorEntityDescription(
key="battery",
device_class=SensorDeviceClass.BATTERY,
native_unit_of_measurement=PERCENTAGE,
entity_category=EntityCategory.DIAGNOSTIC,
name="Battery",
),
"co2": SensorEntityDescription(
key="co2",
device_class=SensorDeviceClass.CO2,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION,
name="CO2",
),
"voc": SensorEntityDescription(
key="voc",
device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS_PARTS,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_BILLION,
name="VOC",
),
"light": SensorEntityDescription(
key="light",
native_unit_of_measurement=PERCENTAGE,
name="Light",
translation_key="light",
),
"virusRisk": SensorEntityDescription(
key="virusRisk",
name="Virus Risk",
translation_key="virus_risk",
),
"mold": SensorEntityDescription(
key="mold",
name="Mold",
translation_key="mold",
),
"rssi": SensorEntityDescription(
key="rssi",
native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS,
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
name="RSSI",
entity_registry_enabled_default=False,
entity_category=EntityCategory.DIAGNOSTIC,
),
@@ -98,13 +92,11 @@ SENSORS: dict[str, SensorEntityDescription] = {
key="pm1",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
device_class=SensorDeviceClass.PM1,
name="PM1",
),
"pm25": SensorEntityDescription(
key="pm25",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
device_class=SensorDeviceClass.PM25,
name="PM25",
),
}
@@ -134,6 +126,7 @@ class AirthingsHeaterEnergySensor(CoordinatorEntity, SensorEntity):
"""Representation of a Airthings Sensor device."""
_attr_state_class = SensorStateClass.MEASUREMENT
_attr_has_entity_name = True
def __init__(
self,
@@ -146,7 +139,6 @@ class AirthingsHeaterEnergySensor(CoordinatorEntity, SensorEntity):
self.entity_description = entity_description
self._attr_name = f"{airthings_device.name} {entity_description.name}"
self._attr_unique_id = f"{airthings_device.device_id}_{entity_description.key}"
self._id = airthings_device.device_id
self._attr_device_info = DeviceInfo(

View File

@@ -17,5 +17,21 @@
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_account%]"
}
},
"entity": {
"sensor": {
"radon": {
"name": "Radon"
},
"light": {
"name": "Light"
},
"virus_risk": {
"name": "Virus Risk"
},
"mold": {
"name": "Mold"
}
}
}
}

View File

@@ -39,26 +39,26 @@ _LOGGER = logging.getLogger(__name__)
SENSORS_MAPPING_TEMPLATE: dict[str, SensorEntityDescription] = {
"radon_1day_avg": SensorEntityDescription(
key="radon_1day_avg",
translation_key="radon_1day_avg",
native_unit_of_measurement=VOLUME_BECQUEREL,
name="Radon 1-day average",
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:radioactive",
),
"radon_longterm_avg": SensorEntityDescription(
key="radon_longterm_avg",
translation_key="radon_longterm_avg",
native_unit_of_measurement=VOLUME_BECQUEREL,
name="Radon longterm average",
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:radioactive",
),
"radon_1day_level": SensorEntityDescription(
key="radon_1day_level",
name="Radon 1-day level",
translation_key="radon_1day_level",
icon="mdi:radioactive",
),
"radon_longterm_level": SensorEntityDescription(
key="radon_longterm_level",
name="Radon longterm level",
translation_key="radon_longterm_level",
icon="mdi:radioactive",
),
"temperature": SensorEntityDescription(
@@ -66,21 +66,18 @@ SENSORS_MAPPING_TEMPLATE: dict[str, SensorEntityDescription] = {
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
name="Temperature",
),
"humidity": SensorEntityDescription(
key="humidity",
device_class=SensorDeviceClass.HUMIDITY,
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
name="Humidity",
),
"pressure": SensorEntityDescription(
key="pressure",
device_class=SensorDeviceClass.PRESSURE,
native_unit_of_measurement=UnitOfPressure.MBAR,
state_class=SensorStateClass.MEASUREMENT,
name="Pressure",
),
"battery": SensorEntityDescription(
key="battery",
@@ -88,20 +85,18 @@ SENSORS_MAPPING_TEMPLATE: dict[str, SensorEntityDescription] = {
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
name="Battery",
),
"co2": SensorEntityDescription(
key="co2",
device_class=SensorDeviceClass.CO2,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION,
state_class=SensorStateClass.MEASUREMENT,
name="co2",
),
"voc": SensorEntityDescription(
key="voc",
device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS_PARTS,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_BILLION,
state_class=SensorStateClass.MEASUREMENT,
name="VOC",
icon="mdi:cloud",
),
"illuminance": SensorEntityDescription(
@@ -109,7 +104,6 @@ SENSORS_MAPPING_TEMPLATE: dict[str, SensorEntityDescription] = {
device_class=SensorDeviceClass.ILLUMINANCE,
native_unit_of_measurement=LIGHT_LUX,
state_class=SensorStateClass.MEASUREMENT,
name="Illuminance",
),
}

View File

@@ -19,5 +19,21 @@
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"unknown": "[%key:common::config_flow::error::unknown%]"
}
},
"entity": {
"sensor": {
"radon_1day_avg": {
"name": "Radon 1-day average"
},
"radon_longterm_avg": {
"name": "Radon longterm average"
},
"radon_1day_level": {
"name": "Radon 1-day level"
},
"radon_longterm_level": {
"name": "Radon longterm level"
}
}
}
}

View File

@@ -17,7 +17,7 @@
"api_key": "[%key:common::config_flow::data::api_key%]",
"city": "City",
"country": "Country",
"state": "state"
"state": "State"
}
},
"reauth_confirm": {

View File

@@ -193,6 +193,8 @@ class AirzoneClimate(AirzoneZoneEntity, ClimateEntity):
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
"""Set hvac mode."""
slave_raise = False
params = {}
if hvac_mode == HVACMode.OFF:
params[API_ON] = 0
@@ -202,12 +204,13 @@ class AirzoneClimate(AirzoneZoneEntity, ClimateEntity):
if self.get_airzone_value(AZD_MASTER):
params[API_MODE] = mode
else:
raise HomeAssistantError(
f"Mode can't be changed on slave zone {self.name}"
)
slave_raise = True
params[API_ON] = 1
await self._async_update_hvac_params(params)
if slave_raise:
raise HomeAssistantError(f"Mode can't be changed on slave zone {self.name}")
async def async_set_temperature(self, **kwargs: Any) -> None:
"""Set new target temperature."""
params = {}

View File

@@ -11,5 +11,5 @@
"documentation": "https://www.home-assistant.io/integrations/airzone",
"iot_class": "local_polling",
"loggers": ["aioairzone"],
"requirements": ["aioairzone==0.6.3"]
"requirements": ["aioairzone==0.6.4"]
}

View File

@@ -12,7 +12,10 @@ from homeassistant.helpers import aiohttp_client
from .const import DOMAIN
from .coordinator import AirzoneUpdateCoordinator
PLATFORMS: list[Platform] = [Platform.SENSOR]
PLATFORMS: list[Platform] = [
Platform.BINARY_SENSOR,
Platform.SENSOR,
]
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:

View File

@@ -0,0 +1,106 @@
"""Support for the Airzone Cloud binary sensors."""
from __future__ import annotations
from dataclasses import dataclass
from typing import Any, Final
from aioairzone_cloud.const import AZD_PROBLEMS, AZD_WARNINGS, AZD_ZONES
from homeassistant.components.binary_sensor import (
BinarySensorDeviceClass,
BinarySensorEntity,
BinarySensorEntityDescription,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import EntityCategory
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import DOMAIN
from .coordinator import AirzoneUpdateCoordinator
from .entity import AirzoneEntity, AirzoneZoneEntity
@dataclass
class AirzoneBinarySensorEntityDescription(BinarySensorEntityDescription):
"""A class that describes Airzone Cloud binary sensor entities."""
attributes: dict[str, str] | None = None
ZONE_BINARY_SENSOR_TYPES: Final[tuple[AirzoneBinarySensorEntityDescription, ...]] = (
AirzoneBinarySensorEntityDescription(
attributes={
"warnings": AZD_WARNINGS,
},
device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC,
key=AZD_PROBLEMS,
),
)
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
"""Add Airzone Cloud binary sensors from a config_entry."""
coordinator: AirzoneUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]
binary_sensors: list[AirzoneBinarySensor] = []
for zone_id, zone_data in coordinator.data.get(AZD_ZONES, {}).items():
for description in ZONE_BINARY_SENSOR_TYPES:
if description.key in zone_data:
binary_sensors.append(
AirzoneZoneBinarySensor(
coordinator,
description,
zone_id,
zone_data,
)
)
async_add_entities(binary_sensors)
class AirzoneBinarySensor(AirzoneEntity, BinarySensorEntity):
"""Define an Airzone Cloud binary sensor."""
entity_description: AirzoneBinarySensorEntityDescription
@callback
def _handle_coordinator_update(self) -> None:
"""Update attributes when the coordinator updates."""
self._async_update_attrs()
super()._handle_coordinator_update()
@callback
def _async_update_attrs(self) -> None:
"""Update binary sensor attributes."""
self._attr_is_on = self.get_airzone_value(self.entity_description.key)
if self.entity_description.attributes:
self._attr_extra_state_attributes = {
key: self.get_airzone_value(val)
for key, val in self.entity_description.attributes.items()
}
class AirzoneZoneBinarySensor(AirzoneZoneEntity, AirzoneBinarySensor):
"""Define an Airzone Cloud Zone binary sensor."""
_attr_has_entity_name = True
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
description: AirzoneBinarySensorEntityDescription,
zone_id: str,
zone_data: dict[str, Any],
) -> None:
"""Initialize."""
super().__init__(coordinator, zone_id, zone_data)
self._attr_unique_id = f"{zone_id}_{description.key}"
self.entity_description = description
self._async_update_attrs()

View File

@@ -15,7 +15,6 @@ from aioairzone_cloud.const import (
AZD_ZONES,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.update_coordinator import CoordinatorEntity
@@ -43,7 +42,6 @@ class AirzoneAidooEntity(AirzoneEntity):
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
entry: ConfigEntry,
aidoo_id: str,
aidoo_data: dict[str, Any],
) -> None:
@@ -73,7 +71,6 @@ class AirzoneWebServerEntity(AirzoneEntity):
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
entry: ConfigEntry,
ws_id: str,
ws_data: dict[str, Any],
) -> None:
@@ -86,7 +83,7 @@ class AirzoneWebServerEntity(AirzoneEntity):
connections={(dr.CONNECTION_NETWORK_MAC, ws_id)},
identifiers={(DOMAIN, ws_id)},
manufacturer=MANUFACTURER,
name=f"WebServer {ws_id}",
name=ws_data[AZD_NAME],
sw_version=ws_data[AZD_FIRMWARE],
)
@@ -104,7 +101,6 @@ class AirzoneZoneEntity(AirzoneEntity):
def __init__(
self,
coordinator: AirzoneUpdateCoordinator,
entry: ConfigEntry,
zone_id: str,
zone_data: dict[str, Any],
) -> None:

View File

@@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/airzone_cloud",
"iot_class": "cloud_polling",
"loggers": ["aioairzone_cloud"],
"requirements": ["aioairzone-cloud==0.1.7"]
"requirements": ["aioairzone-cloud==0.2.0"]
}

View File

@@ -6,7 +6,6 @@ from typing import Any, Final
from aioairzone_cloud.const import (
AZD_AIDOOS,
AZD_HUMIDITY,
AZD_NAME,
AZD_TEMP,
AZD_WEBSERVERS,
AZD_WIFI_RSSI,
@@ -42,7 +41,6 @@ AIDOO_SENSOR_TYPES: Final[tuple[SensorEntityDescription, ...]] = (
SensorEntityDescription(
device_class=SensorDeviceClass.TEMPERATURE,
key=AZD_TEMP,
name="Temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
),
@@ -53,9 +51,7 @@ WEBSERVER_SENSOR_TYPES: Final[tuple[SensorEntityDescription, ...]] = (
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
has_entity_name=True,
key=AZD_WIFI_RSSI,
name="RSSI",
native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
state_class=SensorStateClass.MEASUREMENT,
),
@@ -65,14 +61,12 @@ ZONE_SENSOR_TYPES: Final[tuple[SensorEntityDescription, ...]] = (
SensorEntityDescription(
device_class=SensorDeviceClass.TEMPERATURE,
key=AZD_TEMP,
name="Temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
device_class=SensorDeviceClass.HUMIDITY,
key=AZD_HUMIDITY,
name="Humidity",
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
),
@@ -95,7 +89,6 @@ async def async_setup_entry(
AirzoneAidooSensor(
coordinator,
description,
entry,
aidoo_id,
aidoo_data,
)
@@ -109,7 +102,6 @@ async def async_setup_entry(
AirzoneWebServerSensor(
coordinator,
description,
entry,
ws_id,
ws_data,
)
@@ -123,7 +115,6 @@ async def async_setup_entry(
AirzoneZoneSensor(
coordinator,
description,
entry,
zone_id,
zone_data,
)
@@ -154,14 +145,13 @@ class AirzoneAidooSensor(AirzoneAidooEntity, AirzoneSensor):
self,
coordinator: AirzoneUpdateCoordinator,
description: SensorEntityDescription,
entry: ConfigEntry,
aidoo_id: str,
aidoo_data: dict[str, Any],
) -> None:
"""Initialize."""
super().__init__(coordinator, entry, aidoo_id, aidoo_data)
super().__init__(coordinator, aidoo_id, aidoo_data)
self._attr_name = f"{aidoo_data[AZD_NAME]} {description.name}"
self._attr_has_entity_name = True
self._attr_unique_id = f"{aidoo_id}_{description.key}"
self.entity_description = description
@@ -175,13 +165,13 @@ class AirzoneWebServerSensor(AirzoneWebServerEntity, AirzoneSensor):
self,
coordinator: AirzoneUpdateCoordinator,
description: SensorEntityDescription,
entry: ConfigEntry,
ws_id: str,
ws_data: dict[str, Any],
) -> None:
"""Initialize."""
super().__init__(coordinator, entry, ws_id, ws_data)
super().__init__(coordinator, ws_id, ws_data)
self._attr_has_entity_name = True
self._attr_unique_id = f"{ws_id}_{description.key}"
self.entity_description = description
@@ -195,14 +185,13 @@ class AirzoneZoneSensor(AirzoneZoneEntity, AirzoneSensor):
self,
coordinator: AirzoneUpdateCoordinator,
description: SensorEntityDescription,
entry: ConfigEntry,
zone_id: str,
zone_data: dict[str, Any],
) -> None:
"""Initialize."""
super().__init__(coordinator, entry, zone_id, zone_data)
super().__init__(coordinator, zone_id, zone_data)
self._attr_name = f"{zone_data[AZD_NAME]} {description.name}"
self._attr_has_entity_name = True
self._attr_unique_id = f"{zone_id}_{description.key}"
self.entity_description = description

View File

@@ -40,26 +40,24 @@ class AladdinDevice(CoverEntity):
_attr_device_class = CoverDeviceClass.GARAGE
_attr_supported_features = SUPPORTED_FEATURES
_attr_has_entity_name = True
_attr_name = None
def __init__(
self, acc: AladdinConnectClient, device: DoorDevice, entry: ConfigEntry
) -> None:
"""Initialize the Aladdin Connect cover."""
self._acc = acc
self._entry_id = entry.entry_id
self._device_id = device["device_id"]
self._number = device["door_number"]
self._name = device["name"]
self._serial = device["serial"]
self._model = device["model"]
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, f"{self._device_id}-{self._number}")},
name=self._name,
name=device["name"],
manufacturer="Overhead Door",
model=self._model,
model=device["model"],
)
self._attr_has_entity_name = True
self._attr_unique_id = f"{self._device_id}-{self._number}"
async def async_added_to_hass(self) -> None:

View File

@@ -40,7 +40,6 @@ class AccSensorEntityDescription(
SENSORS: tuple[AccSensorEntityDescription, ...] = (
AccSensorEntityDescription(
key="battery_level",
name="Battery level",
device_class=SensorDeviceClass.BATTERY,
entity_registry_enabled_default=False,
native_unit_of_measurement=PERCENTAGE,
@@ -49,7 +48,7 @@ SENSORS: tuple[AccSensorEntityDescription, ...] = (
),
AccSensorEntityDescription(
key="rssi",
name="Wi-Fi RSSI",
translation_key="wifi_strength",
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
entity_registry_enabled_default=False,
native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS,
@@ -58,7 +57,7 @@ SENSORS: tuple[AccSensorEntityDescription, ...] = (
),
AccSensorEntityDescription(
key="ble_strength",
name="BLE Strength",
translation_key="ble_strength",
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
entity_registry_enabled_default=False,
native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS,
@@ -89,8 +88,8 @@ async def async_setup_entry(
class AladdinConnectSensor(SensorEntity):
"""A sensor implementation for Aladdin Connect devices."""
_device: AladdinConnectSensor
entity_description: AccSensorEntityDescription
_attr_has_entity_name = True
def __init__(
self,
@@ -101,24 +100,20 @@ class AladdinConnectSensor(SensorEntity):
"""Initialize a sensor for an Aladdin Connect device."""
self._device_id = device["device_id"]
self._number = device["door_number"]
self._name = device["name"]
self._model = device["model"]
self._acc = acc
self.entity_description = description
self._attr_unique_id = f"{self._device_id}-{self._number}-{description.key}"
self._attr_has_entity_name = True
if self._model == "01" and description.key in ("battery_level", "ble_strength"):
self._attr_entity_registry_enabled_default = True
@property
def device_info(self) -> DeviceInfo | None:
"""Device information for Aladdin Connect sensors."""
return DeviceInfo(
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, f"{self._device_id}-{self._number}")},
name=self._name,
name=device["name"],
manufacturer="Overhead Door",
model=self._model,
model=device["model"],
)
if device["model"] == "01" and description.key in (
"battery_level",
"ble_strength",
):
self._attr_entity_registry_enabled_default = True
@property
def native_value(self) -> float | None:

View File

@@ -25,5 +25,15 @@
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]",
"reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]"
}
},
"entity": {
"sensor": {
"wifi_strength": {
"name": "Wi-Fi RSSI"
},
"ble_strength": {
"name": "BLE Strength"
}
}
}
}

View File

@@ -5,6 +5,7 @@ from typing import Final
import voluptuous as vol
from homeassistant.components.device_automation import async_validate_entity_schema
from homeassistant.const import (
ATTR_CODE,
ATTR_ENTITY_ID,
@@ -44,15 +45,22 @@ ACTION_TYPES: Final[set[str]] = {
"trigger",
}
ACTION_SCHEMA: Final = cv.DEVICE_ACTION_BASE_SCHEMA.extend(
_ACTION_SCHEMA: Final = cv.DEVICE_ACTION_BASE_SCHEMA.extend(
{
vol.Required(CONF_TYPE): vol.In(ACTION_TYPES),
vol.Required(CONF_ENTITY_ID): cv.entity_domain(DOMAIN),
vol.Required(CONF_ENTITY_ID): cv.entity_id_or_uuid,
vol.Optional(CONF_CODE): cv.string,
}
)
async def async_validate_action_config(
hass: HomeAssistant, config: ConfigType
) -> ConfigType:
"""Validate config."""
return async_validate_entity_schema(hass, config, _ACTION_SCHEMA)
async def async_get_actions(
hass: HomeAssistant, device_id: str
) -> list[dict[str, str]]:
@@ -70,7 +78,7 @@ async def async_get_actions(
base_action: dict = {
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_ENTITY_ID: entry.id,
}
# Add actions for each entity that belongs to this integration
@@ -124,7 +132,9 @@ async def async_get_action_capabilities(
"""List action capabilities."""
# We need to refer to the state directly because ATTR_CODE_ARM_REQUIRED is not a
# capability attribute
state = hass.states.get(config[CONF_ENTITY_ID])
registry = er.async_get(hass)
entity_id = er.async_resolve_entity_id(registry, config[CONF_ENTITY_ID])
state = hass.states.get(entity_id) if entity_id else None
code_required = state.attributes.get(ATTR_CODE_ARM_REQUIRED) if state else False
if config[CONF_TYPE] == "trigger" or (

View File

@@ -58,7 +58,7 @@ CONDITION_TYPES: Final[set[str]] = {
CONDITION_SCHEMA: Final = DEVICE_CONDITION_BASE_SCHEMA.extend(
{
vol.Required(CONF_ENTITY_ID): cv.entity_id,
vol.Required(CONF_ENTITY_ID): cv.entity_id_or_uuid,
vol.Required(CONF_TYPE): vol.In(CONDITION_TYPES),
}
)
@@ -83,7 +83,7 @@ async def async_get_conditions(
CONF_CONDITION: "device",
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_ENTITY_ID: entry.id,
}
conditions += [
@@ -126,8 +126,11 @@ def async_condition_from_config(
elif config[CONF_TYPE] == CONDITION_ARMED_CUSTOM_BYPASS:
state = STATE_ALARM_ARMED_CUSTOM_BYPASS
registry = er.async_get(hass)
entity_id = er.async_resolve_entity_id(registry, config[ATTR_ENTITY_ID])
def test_is_state(hass: HomeAssistant, variables: TemplateVarsType) -> bool:
"""Test if an entity is a certain state."""
return condition.state(hass, config[ATTR_ENTITY_ID], state)
return condition.state(hass, entity_id, state)
return test_is_state

View File

@@ -46,7 +46,7 @@ TRIGGER_TYPES: Final[set[str]] = BASIC_TRIGGER_TYPES | {
TRIGGER_SCHEMA: Final = DEVICE_TRIGGER_BASE_SCHEMA.extend(
{
vol.Required(CONF_ENTITY_ID): cv.entity_id,
vol.Required(CONF_ENTITY_ID): cv.entity_id_or_uuid,
vol.Required(CONF_TYPE): vol.In(TRIGGER_TYPES),
vol.Optional(CONF_FOR): cv.positive_time_period_dict,
}
@@ -72,7 +72,7 @@ async def async_get_triggers(
CONF_PLATFORM: "device",
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_ENTITY_ID: entry.id,
}
triggers += [

View File

@@ -5,5 +5,5 @@
"documentation": "https://www.home-assistant.io/integrations/alpha_vantage",
"iot_class": "cloud_polling",
"loggers": ["alpha_vantage"],
"requirements": ["alpha_vantage==2.3.1"]
"requirements": ["alpha-vantage==2.3.1"]
}

View File

@@ -98,7 +98,7 @@ async def async_setup_entry(
tasks = []
for heater in data_connection.get_devices():
tasks.append(heater.update_device_info())
tasks.append(asyncio.create_task(heater.update_device_info()))
await asyncio.wait(tasks)
devs = []

View File

@@ -7,5 +7,5 @@
"documentation": "https://www.home-assistant.io/integrations/ambiclimate",
"iot_class": "cloud_polling",
"loggers": ["ambiclimate"],
"requirements": ["ambiclimate==0.2.1"]
"requirements": ["Ambiclimate==0.2.1"]
}

View File

@@ -3,6 +3,8 @@ from __future__ import annotations
import logging
from homeassistant.helpers.typing import UndefinedType
from .const import DOMAIN
@@ -14,7 +16,7 @@ def service_signal(service: str, *args: str) -> str:
def log_update_error(
logger: logging.Logger,
action: str,
name: str | None,
name: str | UndefinedType | None,
entity_type: str,
error: Exception,
level: int = logging.ERROR,

View File

@@ -21,12 +21,22 @@ from homeassistant.components.recorder import (
DOMAIN as RECORDER_DOMAIN,
get_instance as get_recorder_instance,
)
import homeassistant.config as conf_util
from homeassistant.config_entries import (
SOURCE_IGNORE,
)
from homeassistant.const import ATTR_DOMAIN, __version__ as HA_VERSION
from homeassistant.core import HomeAssistant
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.aiohttp_client import async_get_clientsession
import homeassistant.helpers.entity_registry as er
from homeassistant.helpers.storage import Store
from homeassistant.helpers.system_info import async_get_system_info
from homeassistant.loader import IntegrationNotFound, async_get_integrations
from homeassistant.loader import (
Integration,
IntegrationNotFound,
async_get_integrations,
)
from homeassistant.setup import async_get_loaded_integrations
from .const import (
@@ -206,8 +216,25 @@ class Analytics:
if self.preferences.get(ATTR_USAGE, False) or self.preferences.get(
ATTR_STATISTICS, False
):
ent_reg = er.async_get(self.hass)
try:
yaml_configuration = await conf_util.async_hass_config_yaml(self.hass)
except HomeAssistantError as err:
LOGGER.error(err)
return
configuration_set = set(yaml_configuration)
er_platforms = {
entity.platform
for entity in ent_reg.entities.values()
if not entity.disabled
}
domains = async_get_loaded_integrations(self.hass)
configured_integrations = await async_get_integrations(self.hass, domains)
enabled_domains = set(configured_integrations)
for integration in configured_integrations.values():
if isinstance(integration, IntegrationNotFound):
continue
@@ -215,7 +242,11 @@ class Analytics:
if isinstance(integration, BaseException):
raise integration
if integration.disabled:
if not self._async_should_report_integration(
integration=integration,
yaml_domains=configuration_set,
entity_registry_platforms=er_platforms,
):
continue
if not integration.is_built_in:
@@ -253,12 +284,12 @@ class Analytics:
if supervisor_info is not None:
payload[ATTR_ADDONS] = addons
if ENERGY_DOMAIN in integrations:
if ENERGY_DOMAIN in enabled_domains:
payload[ATTR_ENERGY] = {
ATTR_CONFIGURED: await energy_is_configured(self.hass)
}
if RECORDER_DOMAIN in integrations:
if RECORDER_DOMAIN in enabled_domains:
instance = get_recorder_instance(self.hass)
engine = instance.database_engine
if engine and engine.version is not None:
@@ -306,3 +337,34 @@ class Analytics:
LOGGER.error(
"Error sending analytics to %s: %r", ANALYTICS_ENDPOINT_URL, err
)
@callback
def _async_should_report_integration(
self,
integration: Integration,
yaml_domains: set[str],
entity_registry_platforms: set[str],
) -> bool:
"""Return a bool to indicate if this integration should be reported."""
if integration.disabled:
return False
# Check if the integration is defined in YAML or in the entity registry
if (
integration.domain in yaml_domains
or integration.domain in entity_registry_platforms
):
return True
# Check if the integration provide a config flow
if not integration.config_flow:
return False
entries = self.hass.config_entries.async_entries(integration.domain)
# Filter out ignored and disabled entries
return any(
entry
for entry in entries
if entry.source != SOURCE_IGNORE and entry.disabled_by is None
)

View File

@@ -296,7 +296,6 @@ class ADBDevice(MediaPlayerEntity):
self._process_config,
)
)
return
@property
def media_image_hash(self) -> str | None:

View File

@@ -16,6 +16,7 @@ from .const import DOMAIN
class AndroidTVRemoteBaseEntity(Entity):
"""Android TV Remote Base Entity."""
_attr_name = None
_attr_has_entity_name = True
_attr_should_poll = False

View File

@@ -5,5 +5,5 @@
"documentation": "https://www.home-assistant.io/integrations/anel_pwrctrl",
"iot_class": "local_polling",
"loggers": ["anel_pwrctrl"],
"requirements": ["anel_pwrctrl-homeassistant==0.0.1.dev2"]
"requirements": ["anel-pwrctrl-homeassistant==0.0.1.dev2"]
}

View File

@@ -430,7 +430,9 @@ INFERRED_UNITS = {
" Percent": PERCENTAGE,
" Volts": UnitOfElectricPotential.VOLT,
" Ampere": UnitOfElectricCurrent.AMPERE,
" Amps": UnitOfElectricCurrent.AMPERE,
" Volt-Ampere": UnitOfApparentPower.VOLT_AMPERE,
" VA": UnitOfApparentPower.VOLT_AMPERE,
" Watts": UnitOfPower.WATT,
" Hz": UnitOfFrequency.HERTZ,
" C": UnitOfTemperature.CELSIUS,

View File

@@ -7,7 +7,7 @@
"documentation": "https://www.home-assistant.io/integrations/apple_tv",
"iot_class": "local_push",
"loggers": ["pyatv", "srptools"],
"requirements": ["pyatv==0.12.0"],
"requirements": ["pyatv==0.13.2"],
"zeroconf": [
"_mediaremotetv._tcp.local.",
"_companion-link._tcp.local.",
@@ -16,24 +16,7 @@
"_touch-able._tcp.local.",
"_appletv-v2._tcp.local.",
"_hscp._tcp.local.",
{
"type": "_airplay._tcp.local.",
"properties": {
"model": "appletv*"
}
},
{
"type": "_airplay._tcp.local.",
"properties": {
"model": "audioaccessory*"
}
},
{
"type": "_airplay._tcp.local.",
"properties": {
"am": "airport*"
}
},
"_airplay._tcp.local.",
{
"type": "_raop._tcp.local.",
"properties": {

View File

@@ -282,7 +282,7 @@ class AppleTvMediaPlayer(AppleTVEntity, MediaPlayerEntity):
"""Send the play_media command to the media player."""
# If input (file) has a file format supported by pyatv, then stream it with
# RAOP. Otherwise try to play it with regular AirPlay.
if media_type == MediaType.APP:
if media_type in {MediaType.APP, MediaType.URL}:
await self.atv.apps.launch_app(media_id)
return

View File

@@ -49,6 +49,7 @@
},
"abort": {
"ipv6_not_supported": "IPv6 is not supported.",
"invalid_auth": "[%key:common::config_flow::error::invalid_auth%]",
"no_devices_found": "[%key:common::config_flow::abort::no_devices_found%]",
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]",
"device_did_not_pair": "No attempt to finish pairing process was made from the device.",

View File

@@ -5,5 +5,5 @@
"documentation": "https://www.home-assistant.io/integrations/aquostv",
"iot_class": "local_polling",
"loggers": ["sharp_aquos_rc"],
"requirements": ["sharp_aquos_rc==0.3.2"]
"requirements": ["sharp-aquos-rc==0.3.2"]
}

View File

@@ -1,6 +1,8 @@
"""Support for Aranet sensors."""
from __future__ import annotations
from dataclasses import dataclass
from aranet4.client import Aranet4Advertisement
from bleak.backends.device import BLEDevice
@@ -23,6 +25,7 @@ from homeassistant.const import (
ATTR_SW_VERSION,
CONCENTRATION_PARTS_PER_MILLION,
PERCENTAGE,
EntityCategory,
UnitOfPressure,
UnitOfTemperature,
UnitOfTime,
@@ -33,43 +36,55 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import DOMAIN
@dataclass
class AranetSensorEntityDescription(SensorEntityDescription):
"""Class to describe an Aranet sensor entity."""
# PassiveBluetoothDataUpdate does not support UNDEFINED
# Restrict the type to satisfy the type checker and catch attempts
# to use UNDEFINED in the entity descriptions.
name: str | None = None
SENSOR_DESCRIPTIONS = {
"temperature": SensorEntityDescription(
"temperature": AranetSensorEntityDescription(
key="temperature",
name="Temperature",
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
),
"humidity": SensorEntityDescription(
"humidity": AranetSensorEntityDescription(
key="humidity",
name="Humidity",
device_class=SensorDeviceClass.HUMIDITY,
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
),
"pressure": SensorEntityDescription(
"pressure": AranetSensorEntityDescription(
key="pressure",
name="Pressure",
device_class=SensorDeviceClass.PRESSURE,
native_unit_of_measurement=UnitOfPressure.HPA,
state_class=SensorStateClass.MEASUREMENT,
),
"co2": SensorEntityDescription(
"co2": AranetSensorEntityDescription(
key="co2",
name="Carbon Dioxide",
device_class=SensorDeviceClass.CO2,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION,
state_class=SensorStateClass.MEASUREMENT,
),
"battery": SensorEntityDescription(
"battery": AranetSensorEntityDescription(
key="battery",
name="Battery",
device_class=SensorDeviceClass.BATTERY,
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC,
),
"interval": SensorEntityDescription(
"interval": AranetSensorEntityDescription(
key="update_interval",
name="Update Interval",
device_class=SensorDeviceClass.DURATION,
@@ -77,6 +92,7 @@ SENSOR_DESCRIPTIONS = {
state_class=SensorStateClass.MEASUREMENT,
# The interval setting is not a generally useful entity for most users.
entity_registry_enabled_default=False,
entity_category=EntityCategory.DIAGNOSTIC,
),
}

View File

@@ -3,7 +3,9 @@ from __future__ import annotations
import voluptuous as vol
from homeassistant.components.device_automation import DEVICE_TRIGGER_BASE_SCHEMA
from homeassistant.components.device_automation import (
DEVICE_TRIGGER_BASE_SCHEMA,
)
from homeassistant.const import (
ATTR_ENTITY_ID,
CONF_DEVICE_ID,
@@ -22,7 +24,7 @@ from .const import DOMAIN, EVENT_TURN_ON
TRIGGER_TYPES = {"turn_on"}
TRIGGER_SCHEMA = DEVICE_TRIGGER_BASE_SCHEMA.extend(
{
vol.Required(CONF_ENTITY_ID): cv.entity_id,
vol.Required(CONF_ENTITY_ID): cv.entity_id_or_uuid,
vol.Required(CONF_TYPE): vol.In(TRIGGER_TYPES),
}
)
@@ -43,7 +45,7 @@ async def async_get_triggers(
CONF_PLATFORM: "device",
CONF_DEVICE_ID: device_id,
CONF_DOMAIN: DOMAIN,
CONF_ENTITY_ID: entry.entity_id,
CONF_ENTITY_ID: entry.id,
CONF_TYPE: "turn_on",
}
)
@@ -62,7 +64,8 @@ async def async_attach_trigger(
job = HassJob(action)
if config[CONF_TYPE] == "turn_on":
entity_id = config[CONF_ENTITY_ID]
registry = er.async_get(hass)
entity_id = er.async_resolve_entity_id(registry, config[ATTR_ENTITY_ID])
@callback
def _handle_event(event: Event) -> None:
@@ -71,9 +74,10 @@ async def async_attach_trigger(
job,
{
"trigger": {
**trigger_data, # type: ignore[arg-type] # https://github.com/python/mypy/issues/9117
**trigger_data,
**config,
"description": f"{DOMAIN} - {entity_id}",
"entity_id": entity_id,
}
},
event.context,

View File

@@ -6,7 +6,7 @@
"documentation": "https://www.home-assistant.io/integrations/arcam_fmj",
"iot_class": "local_polling",
"loggers": ["arcam"],
"requirements": ["arcam-fmj==1.3.0"],
"requirements": ["arcam-fmj==1.4.0"],
"ssdp": [
{
"deviceType": "urn:schemas-upnp-org:device:MediaRenderer:1",

View File

@@ -57,6 +57,7 @@ async def async_pipeline_from_audio_stream(
pipeline_id: str | None = None,
conversation_id: str | None = None,
tts_audio_output: str | None = None,
device_id: str | None = None,
) -> None:
"""Create an audio pipeline from an audio stream.
@@ -64,6 +65,7 @@ async def async_pipeline_from_audio_stream(
"""
pipeline_input = PipelineInput(
conversation_id=conversation_id,
device_id=device_id,
stt_metadata=stt_metadata,
stt_stream=stt_stream,
run=PipelineRun(

View File

@@ -499,7 +499,7 @@ class PipelineRun:
self.intent_agent = agent_info.id
async def recognize_intent(
self, intent_input: str, conversation_id: str | None
self, intent_input: str, conversation_id: str | None, device_id: str | None
) -> str:
"""Run intent recognition portion of pipeline. Returns text to speak."""
if self.intent_agent is None:
@@ -512,6 +512,8 @@ class PipelineRun:
"engine": self.intent_agent,
"language": self.pipeline.conversation_language,
"intent_input": intent_input,
"conversation_id": conversation_id,
"device_id": device_id,
},
)
)
@@ -521,6 +523,7 @@ class PipelineRun:
hass=self.hass,
text=intent_input,
conversation_id=conversation_id,
device_id=device_id,
context=self.context,
language=self.pipeline.conversation_language,
agent_id=self.intent_agent,
@@ -655,6 +658,8 @@ class PipelineInput:
conversation_id: str | None = None
device_id: str | None = None
async def execute(self) -> None:
"""Run pipeline."""
self.run.start()
@@ -678,7 +683,9 @@ class PipelineInput:
if current_stage == PipelineStage.INTENT:
assert intent_input is not None
tts_input = await self.run.recognize_intent(
intent_input, self.conversation_id
intent_input,
self.conversation_id,
self.device_id,
)
current_stage = PipelineStage.TTS
@@ -730,17 +737,30 @@ class PipelineInput:
)
start_stage_index = PIPELINE_STAGE_ORDER.index(self.run.start_stage)
end_stage_index = PIPELINE_STAGE_ORDER.index(self.run.end_stage)
prepare_tasks = []
if start_stage_index <= PIPELINE_STAGE_ORDER.index(PipelineStage.STT):
if (
start_stage_index
<= PIPELINE_STAGE_ORDER.index(PipelineStage.STT)
<= end_stage_index
):
# self.stt_metadata can't be None or we'd raise above
prepare_tasks.append(self.run.prepare_speech_to_text(self.stt_metadata)) # type: ignore[arg-type]
if start_stage_index <= PIPELINE_STAGE_ORDER.index(PipelineStage.INTENT):
if (
start_stage_index
<= PIPELINE_STAGE_ORDER.index(PipelineStage.INTENT)
<= end_stage_index
):
prepare_tasks.append(self.run.prepare_recognize_intent())
if start_stage_index <= PIPELINE_STAGE_ORDER.index(PipelineStage.TTS):
if (
start_stage_index
<= PIPELINE_STAGE_ORDER.index(PipelineStage.TTS)
<= end_stage_index
):
prepare_tasks.append(self.run.prepare_text_to_speech())
if prepare_tasks:
@@ -944,6 +964,7 @@ class PipelineData:
pipeline_runs: dict[str, LimitedSizeDict[str, PipelineRunDebug]]
pipeline_store: PipelineStorageCollection
pipeline_devices: set[str] = field(default_factory=set, init=False)
@dataclass

View File

@@ -10,7 +10,8 @@ from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import collection, entity_registry as er, restore_state
from .const import DOMAIN
from .pipeline import PipelineStorageCollection
from .pipeline import PipelineData, PipelineStorageCollection
from .vad import VadSensitivity
OPTION_PREFERRED = "preferred"
@@ -38,6 +39,25 @@ def get_chosen_pipeline(
)
@callback
def get_vad_sensitivity(
hass: HomeAssistant, domain: str, unique_id_prefix: str
) -> VadSensitivity:
"""Get the chosen vad sensitivity for a domain."""
ent_reg = er.async_get(hass)
sensitivity_entity_id = ent_reg.async_get_entity_id(
Platform.SELECT, domain, f"{unique_id_prefix}-vad_sensitivity"
)
if sensitivity_entity_id is None:
return VadSensitivity.DEFAULT
state = hass.states.get(sensitivity_entity_id)
if state is None:
return VadSensitivity.DEFAULT
return VadSensitivity(state.state)
class AssistPipelineSelect(SelectEntity, restore_state.RestoreEntity):
"""Entity to represent a pipeline selector."""
@@ -60,15 +80,24 @@ class AssistPipelineSelect(SelectEntity, restore_state.RestoreEntity):
"""When entity is added to Home Assistant."""
await super().async_added_to_hass()
pipeline_store: PipelineStorageCollection = self.hass.data[
DOMAIN
].pipeline_store
pipeline_store.async_add_change_set_listener(self._pipelines_updated)
pipeline_data: PipelineData = self.hass.data[DOMAIN]
pipeline_store = pipeline_data.pipeline_store
self.async_on_remove(
pipeline_store.async_add_change_set_listener(self._pipelines_updated)
)
state = await self.async_get_last_state()
if state is not None and state.state in self.options:
self._attr_current_option = state.state
if self.registry_entry and (device_id := self.registry_entry.device_id):
pipeline_data.pipeline_devices.add(device_id)
self.async_on_remove(
lambda: pipeline_data.pipeline_devices.discard(
device_id # type: ignore[arg-type]
)
)
async def async_select_option(self, option: str) -> None:
"""Select an option."""
self._attr_current_option = option
@@ -93,3 +122,34 @@ class AssistPipelineSelect(SelectEntity, restore_state.RestoreEntity):
if self._attr_current_option not in options:
self._attr_current_option = OPTION_PREFERRED
class VadSensitivitySelect(SelectEntity, restore_state.RestoreEntity):
"""Entity to represent VAD sensitivity."""
entity_description = SelectEntityDescription(
key="vad_sensitivity",
translation_key="vad_sensitivity",
entity_category=EntityCategory.CONFIG,
)
_attr_should_poll = False
_attr_current_option = VadSensitivity.DEFAULT.value
_attr_options = [vs.value for vs in VadSensitivity]
def __init__(self, hass: HomeAssistant, unique_id_prefix: str) -> None:
"""Initialize a pipeline selector."""
self._attr_unique_id = f"{unique_id_prefix}-vad_sensitivity"
self.hass = hass
async def async_added_to_hass(self) -> None:
"""When entity is added to Home Assistant."""
await super().async_added_to_hass()
state = await self.async_get_last_state()
if state is not None and state.state in self.options:
self._attr_current_option = state.state
async def async_select_option(self, option: str) -> None:
"""Select an option."""
self._attr_current_option = option
self.async_write_ha_state()

View File

@@ -11,6 +11,14 @@
"state": {
"preferred": "Preferred"
}
},
"vad_sensitivity": {
"name": "Finished speaking detection",
"state": {
"default": "Default",
"aggressive": "Aggressive",
"relaxed": "Relaxed"
}
}
}
}

View File

@@ -1,11 +1,35 @@
"""Voice activity detection."""
from __future__ import annotations
from dataclasses import dataclass, field
import webrtcvad
from homeassistant.backports.enum import StrEnum
_SAMPLE_RATE = 16000
class VadSensitivity(StrEnum):
"""How quickly the end of a voice command is detected."""
DEFAULT = "default"
RELAXED = "relaxed"
AGGRESSIVE = "aggressive"
@staticmethod
def to_seconds(sensitivity: VadSensitivity | str) -> float:
"""Return seconds of silence for sensitivity level."""
sensitivity = VadSensitivity(sensitivity)
if sensitivity == VadSensitivity.RELAXED:
return 2.0
if sensitivity == VadSensitivity.AGGRESSIVE:
return 0.5
return 1.0
@dataclass
class VoiceCommandSegmenter:
"""Segments an audio stream into voice commands using webrtcvad."""
@@ -113,16 +137,15 @@ class VoiceCommandSegmenter:
self._reset_seconds_left -= self._seconds_per_chunk
if self._reset_seconds_left <= 0:
self._speech_seconds_left = self.speech_seconds
elif not is_speech:
self._reset_seconds_left = self.reset_seconds
self._silence_seconds_left -= self._seconds_per_chunk
if self._silence_seconds_left <= 0:
return False
else:
if not is_speech:
self._reset_seconds_left = self.reset_seconds
self._silence_seconds_left -= self._seconds_per_chunk
if self._silence_seconds_left <= 0:
return False
else:
# Reset if enough speech
self._reset_seconds_left -= self._seconds_per_chunk
if self._reset_seconds_left <= 0:
self._silence_seconds_left = self.silence_seconds
# Reset if enough speech
self._reset_seconds_left -= self._seconds_per_chunk
if self._reset_seconds_left <= 0:
self._silence_seconds_left = self.silence_seconds
return True

View File

@@ -56,6 +56,7 @@ def async_register_websocket_api(hass: HomeAssistant) -> None:
vol.Optional("input"): dict,
vol.Optional("pipeline"): str,
vol.Optional("conversation_id"): vol.Any(str, None),
vol.Optional("device_id"): vol.Any(str, None),
vol.Optional("timeout"): vol.Any(float, int),
},
),
@@ -105,6 +106,7 @@ async def websocket_run(
# Arguments to PipelineInput
input_args: dict[str, Any] = {
"conversation_id": msg.get("conversation_id"),
"device_id": msg.get("device_id"),
}
if start_stage == PipelineStage.STT:
@@ -280,7 +282,6 @@ def websocket_get_run(
)
@callback
@websocket_api.websocket_command(
{
vol.Required("type"): "assist_pipeline/language/list",

View File

@@ -5,5 +5,5 @@
"documentation": "https://www.home-assistant.io/integrations/asterisk_mbox",
"iot_class": "local_push",
"loggers": ["asterisk_mbox"],
"requirements": ["asterisk_mbox==0.5.0"]
"requirements": ["asterisk-mbox==0.5.0"]
}

View File

@@ -15,6 +15,7 @@ from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_TEMPERATURE, Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.util.enum import try_parse_enum
from . import DOMAIN, AtagEntity
@@ -52,14 +53,12 @@ class AtagThermostat(AtagEntity, ClimateEntity):
self._attr_temperature_unit = coordinator.data.climate.temp_unit
@property
def hvac_mode(self) -> str | None:
def hvac_mode(self) -> HVACMode | None:
"""Return hvac operation ie. heat, cool mode."""
if self.coordinator.data.climate.hvac_mode in HVAC_MODES:
return self.coordinator.data.climate.hvac_mode
return None
return try_parse_enum(HVACMode, self.coordinator.data.climate.hvac_mode)
@property
def hvac_action(self) -> str | None:
def hvac_action(self) -> HVACAction | None:
"""Return the current running hvac operation."""
is_active = self.coordinator.data.climate.status
return HVACAction.HEATING if is_active else HVACAction.IDLE

View File

@@ -5,5 +5,5 @@
"documentation": "https://www.home-assistant.io/integrations/atome",
"iot_class": "cloud_polling",
"loggers": ["pyatome"],
"requirements": ["pyatome==0.1.1"]
"requirements": ["pyAtome==0.1.1"]
}

View File

@@ -5,7 +5,6 @@ from collections.abc import Callable
from dataclasses import dataclass
from datetime import datetime, timedelta
import logging
from typing import cast
from yalexs.activity import (
ACTION_DOORBELL_CALL_MISSED,
@@ -104,7 +103,16 @@ def _native_datetime() -> datetime:
@dataclass
class AugustRequiredKeysMixin:
class AugustBinarySensorEntityDescription(BinarySensorEntityDescription):
"""Describes August binary_sensor entity."""
# AugustBinarySensor does not support UNDEFINED or None,
# restrict the type to str.
name: str = ""
@dataclass
class AugustDoorbellRequiredKeysMixin:
"""Mixin for required keys."""
value_fn: Callable[[AugustData, DoorbellDetail], bool]
@@ -112,41 +120,45 @@ class AugustRequiredKeysMixin:
@dataclass
class AugustBinarySensorEntityDescription(
BinarySensorEntityDescription, AugustRequiredKeysMixin
class AugustDoorbellBinarySensorEntityDescription(
BinarySensorEntityDescription, AugustDoorbellRequiredKeysMixin
):
"""Describes August binary_sensor entity."""
# AugustDoorbellBinarySensor does not support UNDEFINED or None,
# restrict the type to str.
name: str = ""
SENSOR_TYPE_DOOR = BinarySensorEntityDescription(
SENSOR_TYPE_DOOR = AugustBinarySensorEntityDescription(
key="door_open",
name="Open",
)
SENSOR_TYPES_DOORBELL: tuple[AugustBinarySensorEntityDescription, ...] = (
AugustBinarySensorEntityDescription(
SENSOR_TYPES_DOORBELL: tuple[AugustDoorbellBinarySensorEntityDescription, ...] = (
AugustDoorbellBinarySensorEntityDescription(
key="doorbell_ding",
name="Ding",
device_class=BinarySensorDeviceClass.OCCUPANCY,
value_fn=_retrieve_ding_state,
is_time_based=True,
),
AugustBinarySensorEntityDescription(
AugustDoorbellBinarySensorEntityDescription(
key="doorbell_motion",
name="Motion",
device_class=BinarySensorDeviceClass.MOTION,
value_fn=_retrieve_motion_state,
is_time_based=True,
),
AugustBinarySensorEntityDescription(
AugustDoorbellBinarySensorEntityDescription(
key="doorbell_image_capture",
name="Image Capture",
icon="mdi:file-image",
value_fn=_retrieve_image_capture_state,
is_time_based=True,
),
AugustBinarySensorEntityDescription(
AugustDoorbellBinarySensorEntityDescription(
key="doorbell_online",
name="Online",
device_class=BinarySensorDeviceClass.CONNECTIVITY,
@@ -199,7 +211,10 @@ class AugustDoorBinarySensor(AugustEntityMixin, BinarySensorEntity):
_attr_device_class = BinarySensorDeviceClass.DOOR
def __init__(
self, data: AugustData, device: Lock, description: BinarySensorEntityDescription
self,
data: AugustData,
device: Lock,
description: AugustBinarySensorEntityDescription,
) -> None:
"""Initialize the sensor."""
super().__init__(data, device)
@@ -207,9 +222,7 @@ class AugustDoorBinarySensor(AugustEntityMixin, BinarySensorEntity):
self._data = data
self._device = device
self._attr_name = f"{device.device_name} {description.name}"
self._attr_unique_id = (
f"{self._device_id}_{cast(str, description.name).lower()}"
)
self._attr_unique_id = f"{self._device_id}_{description.name.lower()}"
@callback
def _update_from_data(self):
@@ -243,13 +256,13 @@ class AugustDoorBinarySensor(AugustEntityMixin, BinarySensorEntity):
class AugustDoorbellBinarySensor(AugustEntityMixin, BinarySensorEntity):
"""Representation of an August binary sensor."""
entity_description: AugustBinarySensorEntityDescription
entity_description: AugustDoorbellBinarySensorEntityDescription
def __init__(
self,
data: AugustData,
device: Doorbell,
description: AugustBinarySensorEntityDescription,
description: AugustDoorbellBinarySensorEntityDescription,
) -> None:
"""Initialize the sensor."""
super().__init__(data, device)
@@ -257,9 +270,7 @@ class AugustDoorbellBinarySensor(AugustEntityMixin, BinarySensorEntity):
self._check_for_off_update_listener = None
self._data = data
self._attr_name = f"{device.device_name} {description.name}"
self._attr_unique_id = (
f"{self._device_id}_{cast(str, description.name).lower()}"
)
self._attr_unique_id = f"{self._device_id}_{description.name.lower()}"
@callback
def _update_from_data(self):

View File

@@ -28,5 +28,5 @@
"documentation": "https://www.home-assistant.io/integrations/august",
"iot_class": "cloud_push",
"loggers": ["pubnub", "yalexs"],
"requirements": ["yalexs==1.5.1", "yalexs-ble==2.1.17"]
"requirements": ["yalexs==1.5.1", "yalexs-ble==2.1.18"]
}

View File

@@ -1,25 +1,15 @@
"""The aurora component."""
from datetime import timedelta
import logging
from aiohttp import ClientError
from auroranoaa import AuroraForecast
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME, Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers import aiohttp_client
from homeassistant.helpers.device_registry import DeviceEntryType
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.update_coordinator import (
CoordinatorEntity,
DataUpdateCoordinator,
UpdateFailed,
)
from .const import (
ATTRIBUTION,
AURORA_API,
CONF_THRESHOLD,
COORDINATOR,
@@ -27,6 +17,7 @@ from .const import (
DEFAULT_THRESHOLD,
DOMAIN,
)
from .coordinator import AuroraDataUpdateCoordinator
_LOGGER = logging.getLogger(__name__)
@@ -79,71 +70,3 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
hass.data[DOMAIN].pop(entry.entry_id)
return unload_ok
class AuroraDataUpdateCoordinator(DataUpdateCoordinator):
"""Class to manage fetching data from the NOAA Aurora API."""
def __init__(
self,
hass: HomeAssistant,
name: str,
polling_interval: int,
api: str,
latitude: float,
longitude: float,
threshold: float,
) -> None:
"""Initialize the data updater."""
super().__init__(
hass=hass,
logger=_LOGGER,
name=name,
update_interval=timedelta(minutes=polling_interval),
)
self.api = api
self.name = name
self.latitude = int(latitude)
self.longitude = int(longitude)
self.threshold = int(threshold)
async def _async_update_data(self):
"""Fetch the data from the NOAA Aurora Forecast."""
try:
return await self.api.get_forecast_data(self.longitude, self.latitude)
except ClientError as error:
raise UpdateFailed(f"Error updating from NOAA: {error}") from error
class AuroraEntity(CoordinatorEntity[AuroraDataUpdateCoordinator]):
"""Implementation of the base Aurora Entity."""
_attr_attribution = ATTRIBUTION
def __init__(
self,
coordinator: AuroraDataUpdateCoordinator,
name: str,
icon: str,
) -> None:
"""Initialize the Aurora Entity."""
super().__init__(coordinator=coordinator)
self._attr_name = name
self._attr_unique_id = f"{coordinator.latitude}_{coordinator.longitude}"
self._attr_icon = icon
@property
def device_info(self) -> DeviceInfo:
"""Define the device based on name."""
return DeviceInfo(
entry_type=DeviceEntryType.SERVICE,
identifiers={(DOMAIN, str(self.unique_id))},
manufacturer="NOAA",
model="Aurora Visibility Sensor",
name=self.coordinator.name,
)

View File

@@ -4,8 +4,8 @@ from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import AuroraEntity
from .const import COORDINATOR, DOMAIN
from .entity import AuroraEntity
async def async_setup_entry(

View File

@@ -0,0 +1,52 @@
"""The aurora component."""
from datetime import timedelta
import logging
from aiohttp import ClientError
from auroranoaa import AuroraForecast
from homeassistant.core import HomeAssistant
from homeassistant.helpers.update_coordinator import (
DataUpdateCoordinator,
UpdateFailed,
)
_LOGGER = logging.getLogger(__name__)
class AuroraDataUpdateCoordinator(DataUpdateCoordinator):
"""Class to manage fetching data from the NOAA Aurora API."""
def __init__(
self,
hass: HomeAssistant,
name: str,
polling_interval: int,
api: AuroraForecast,
latitude: float,
longitude: float,
threshold: float,
) -> None:
"""Initialize the data updater."""
super().__init__(
hass=hass,
logger=_LOGGER,
name=name,
update_interval=timedelta(minutes=polling_interval),
)
self.api = api
self.name = name
self.latitude = int(latitude)
self.longitude = int(longitude)
self.threshold = int(threshold)
async def _async_update_data(self):
"""Fetch the data from the NOAA Aurora Forecast."""
try:
return await self.api.get_forecast_data(self.longitude, self.latitude)
except ClientError as error:
raise UpdateFailed(f"Error updating from NOAA: {error}") from error

View File

@@ -0,0 +1,48 @@
"""The aurora component."""
import logging
from homeassistant.helpers.device_registry import DeviceEntryType
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.update_coordinator import (
CoordinatorEntity,
)
from .const import (
ATTRIBUTION,
DOMAIN,
)
from .coordinator import AuroraDataUpdateCoordinator
_LOGGER = logging.getLogger(__name__)
class AuroraEntity(CoordinatorEntity[AuroraDataUpdateCoordinator]):
"""Implementation of the base Aurora Entity."""
_attr_attribution = ATTRIBUTION
def __init__(
self,
coordinator: AuroraDataUpdateCoordinator,
name: str,
icon: str,
) -> None:
"""Initialize the Aurora Entity."""
super().__init__(coordinator=coordinator)
self._attr_name = name
self._attr_unique_id = f"{coordinator.latitude}_{coordinator.longitude}"
self._attr_icon = icon
@property
def device_info(self) -> DeviceInfo:
"""Define the device based on name."""
return DeviceInfo(
entry_type=DeviceEntryType.SERVICE,
identifiers={(DOMAIN, str(self.unique_id))},
manufacturer="NOAA",
model="Aurora Visibility Sensor",
name=self.coordinator.name,
)

View File

@@ -5,8 +5,8 @@ from homeassistant.const import PERCENTAGE
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import AuroraEntity
from .const import COORDINATOR, DOMAIN
from .entity import AuroraEntity
async def async_setup_entry(

View File

@@ -47,10 +47,10 @@ class AuroraEntity(Entity):
@property
def device_info(self) -> DeviceInfo:
"""Return device specific attributes."""
return {
"identifiers": {(DOMAIN, self._data[ATTR_SERIAL_NUMBER])},
"manufacturer": MANUFACTURER,
"model": self._data[ATTR_MODEL],
"name": self._data.get(ATTR_DEVICE_NAME, DEFAULT_DEVICE_NAME),
"sw_version": self._data[ATTR_FIRMWARE],
}
return DeviceInfo(
identifiers={(DOMAIN, self._data[ATTR_SERIAL_NUMBER])},
manufacturer=MANUFACTURER,
model=self._data[ATTR_MODEL],
name=self._data.get(ATTR_DEVICE_NAME, DEFAULT_DEVICE_NAME),
sw_version=self._data[ATTR_FIRMWARE],
)

View File

@@ -34,7 +34,7 @@ SENSOR_TYPES = [
device_class=SensorDeviceClass.POWER,
native_unit_of_measurement=UnitOfPower.WATT,
state_class=SensorStateClass.MEASUREMENT,
name="Power Output",
translation_key="power_output",
),
SensorEntityDescription(
key="temp",
@@ -42,14 +42,13 @@ SENSOR_TYPES = [
entity_category=EntityCategory.DIAGNOSTIC,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
name="Temperature",
),
SensorEntityDescription(
key="totalenergy",
device_class=SensorDeviceClass.ENERGY,
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
state_class=SensorStateClass.TOTAL_INCREASING,
name="Total Energy",
translation_key="total_energy",
),
]
@@ -75,6 +74,8 @@ async def async_setup_entry(
class AuroraSensor(AuroraEntity, SensorEntity):
"""Representation of a Sensor on a Aurora ABB PowerOne Solar inverter."""
_attr_has_entity_name = True
def __init__(
self,
client: AuroraSerialClient,

View File

@@ -18,5 +18,15 @@
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]",
"no_serial_ports": "No com ports found. Need a valid RS485 device to communicate."
}
},
"entity": {
"sensor": {
"power_output": {
"name": "Power Output"
},
"total_energy": {
"name": "Total Energy"
}
}
}
}

View File

@@ -35,7 +35,7 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
# Internet Services sensors
SensorValueEntityDescription(
key="usedMb",
name="Data used",
translation_key="data_used",
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=UnitOfInformation.MEGABYTES,
device_class=SensorDeviceClass.DATA_SIZE,
@@ -43,7 +43,7 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
),
SensorValueEntityDescription(
key="downloadedMb",
name="Downloaded",
translation_key="downloaded",
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=UnitOfInformation.MEGABYTES,
device_class=SensorDeviceClass.DATA_SIZE,
@@ -51,7 +51,7 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
),
SensorValueEntityDescription(
key="uploadedMb",
name="Uploaded",
translation_key="uploaded",
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=UnitOfInformation.MEGABYTES,
device_class=SensorDeviceClass.DATA_SIZE,
@@ -60,21 +60,21 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
# Mobile Phone Services sensors
SensorValueEntityDescription(
key="national",
name="National calls",
translation_key="national_calls",
state_class=SensorStateClass.TOTAL_INCREASING,
icon="mdi:phone",
value=lambda x: x.get("calls"),
),
SensorValueEntityDescription(
key="mobile",
name="Mobile calls",
translation_key="mobile_calls",
state_class=SensorStateClass.TOTAL_INCREASING,
icon="mdi:phone",
value=lambda x: x.get("calls"),
),
SensorValueEntityDescription(
key="international",
name="International calls",
translation_key="international_calls",
entity_registry_enabled_default=False,
state_class=SensorStateClass.TOTAL_INCREASING,
icon="mdi:phone-plus",
@@ -82,14 +82,14 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
),
SensorValueEntityDescription(
key="sms",
name="SMS sent",
translation_key="sms_sent",
state_class=SensorStateClass.TOTAL_INCREASING,
icon="mdi:message-processing",
value=lambda x: x.get("calls"),
),
SensorValueEntityDescription(
key="internet",
name="Data used",
translation_key="data_used",
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=UnitOfInformation.KILOBYTES,
device_class=SensorDeviceClass.DATA_SIZE,
@@ -98,7 +98,7 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
),
SensorValueEntityDescription(
key="voicemail",
name="Voicemail calls",
translation_key="voicemail_calls",
entity_registry_enabled_default=False,
state_class=SensorStateClass.TOTAL_INCREASING,
icon="mdi:phone",
@@ -106,7 +106,7 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
),
SensorValueEntityDescription(
key="other",
name="Other calls",
translation_key="other_calls",
entity_registry_enabled_default=False,
state_class=SensorStateClass.TOTAL_INCREASING,
icon="mdi:phone",
@@ -115,13 +115,13 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
# Generic sensors
SensorValueEntityDescription(
key="daysTotal",
name="Billing cycle length",
translation_key="billing_cycle_length",
native_unit_of_measurement=UnitOfTime.DAYS,
icon="mdi:calendar-range",
),
SensorValueEntityDescription(
key="daysRemaining",
name="Billing cycle remaining",
translation_key="billing_cycle_remaining",
native_unit_of_measurement=UnitOfTime.DAYS,
icon="mdi:calendar-clock",
),

View File

@@ -46,5 +46,42 @@
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"unknown": "[%key:common::config_flow::error::unknown%]"
}
},
"entity": {
"sensor": {
"data_used": {
"name": "Data used"
},
"downloaded": {
"name": "Downloaded"
},
"uploaded": {
"name": "Uploaded"
},
"national_calls": {
"name": "National calls"
},
"mobile_calls": {
"name": "Mobile calls"
},
"international_calls": {
"name": "International calls"
},
"sms_sent": {
"name": "SMS sent"
},
"voicemail_calls": {
"name": "Voicemail calls"
},
"other_calls": {
"name": "Other calls"
},
"billing_cycle_length": {
"name": "Billing cycle length"
},
"billing_cycle_remaining": {
"name": "Billing cycle remaining"
}
}
}
}

View File

@@ -1,6 +1,7 @@
"""Allow to set up simple automation rules via the config file."""
from __future__ import annotations
from abc import ABC, abstractmethod
import asyncio
from collections.abc import Callable, Mapping
from dataclasses import dataclass
@@ -153,7 +154,7 @@ def _automations_with_x(
if DOMAIN not in hass.data:
return []
component: EntityComponent[AutomationEntity] = hass.data[DOMAIN]
component: EntityComponent[BaseAutomationEntity] = hass.data[DOMAIN]
return [
automation_entity.entity_id
@@ -169,7 +170,7 @@ def _x_in_automation(
if DOMAIN not in hass.data:
return []
component: EntityComponent[AutomationEntity] = hass.data[DOMAIN]
component: EntityComponent[BaseAutomationEntity] = hass.data[DOMAIN]
if (automation_entity := component.get_entity(entity_id)) is None:
return []
@@ -219,7 +220,7 @@ def automations_with_blueprint(hass: HomeAssistant, blueprint_path: str) -> list
if DOMAIN not in hass.data:
return []
component: EntityComponent[AutomationEntity] = hass.data[DOMAIN]
component: EntityComponent[BaseAutomationEntity] = hass.data[DOMAIN]
return [
automation_entity.entity_id
@@ -234,7 +235,7 @@ def blueprint_in_automation(hass: HomeAssistant, entity_id: str) -> str | None:
if DOMAIN not in hass.data:
return None
component: EntityComponent[AutomationEntity] = hass.data[DOMAIN]
component: EntityComponent[BaseAutomationEntity] = hass.data[DOMAIN]
if (automation_entity := component.get_entity(entity_id)) is None:
return None
@@ -244,7 +245,7 @@ def blueprint_in_automation(hass: HomeAssistant, entity_id: str) -> str | None:
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up all automations."""
hass.data[DOMAIN] = component = EntityComponent[AutomationEntity](
hass.data[DOMAIN] = component = EntityComponent[BaseAutomationEntity](
LOGGER, DOMAIN, hass
)
@@ -262,7 +263,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
await async_get_blueprints(hass).async_populate()
async def trigger_service_handler(
entity: AutomationEntity, service_call: ServiceCall
entity: BaseAutomationEntity, service_call: ServiceCall
) -> None:
"""Handle forced automation trigger, e.g. from frontend."""
await entity.async_trigger(
@@ -310,7 +311,103 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
return True
class AutomationEntity(ToggleEntity, RestoreEntity):
class BaseAutomationEntity(ToggleEntity, ABC):
"""Base class for automation entities."""
raw_config: ConfigType | None
@property
def capability_attributes(self) -> dict[str, Any] | None:
"""Return capability attributes."""
if self.unique_id is not None:
return {CONF_ID: self.unique_id}
return None
@property
@abstractmethod
def referenced_areas(self) -> set[str]:
"""Return a set of referenced areas."""
@property
@abstractmethod
def referenced_blueprint(self) -> str | None:
"""Return referenced blueprint or None."""
@property
@abstractmethod
def referenced_devices(self) -> set[str]:
"""Return a set of referenced devices."""
@property
@abstractmethod
def referenced_entities(self) -> set[str]:
"""Return a set of referenced entities."""
@abstractmethod
async def async_trigger(
self,
run_variables: dict[str, Any],
context: Context | None = None,
skip_condition: bool = False,
) -> None:
"""Trigger automation."""
class UnavailableAutomationEntity(BaseAutomationEntity):
"""A non-functional automation entity with its state set to unavailable.
This class is instatiated when an automation fails to validate.
"""
_attr_should_poll = False
_attr_available = False
def __init__(
self,
automation_id: str | None,
name: str,
raw_config: ConfigType | None,
) -> None:
"""Initialize an automation entity."""
self._name = name
self._attr_unique_id = automation_id
self.raw_config = raw_config
@property
def name(self) -> str:
"""Return the name of the entity."""
return self._name
@property
def referenced_areas(self) -> set[str]:
"""Return a set of referenced areas."""
return set()
@property
def referenced_blueprint(self) -> str | None:
"""Return referenced blueprint or None."""
return None
@property
def referenced_devices(self) -> set[str]:
"""Return a set of referenced devices."""
return set()
@property
def referenced_entities(self) -> set[str]:
"""Return a set of referenced entities."""
return set()
async def async_trigger(
self,
run_variables: dict[str, Any],
context: Context | None = None,
skip_condition: bool = False,
) -> None:
"""Trigger automation."""
class AutomationEntity(BaseAutomationEntity, RestoreEntity):
"""Entity to show status of entity."""
_attr_should_poll = False
@@ -330,7 +427,7 @@ class AutomationEntity(ToggleEntity, RestoreEntity):
trace_config: ConfigType,
) -> None:
"""Initialize an automation entity."""
self._attr_name = name
self._name = name
self._trigger_config = trigger_config
self._async_detach_triggers: CALLBACK_TYPE | None = None
self._cond_func = cond_func
@@ -348,6 +445,11 @@ class AutomationEntity(ToggleEntity, RestoreEntity):
self._trace_config = trace_config
self._attr_unique_id = automation_id
@property
def name(self) -> str:
"""Return the name of the entity."""
return self._name
@property
def extra_state_attributes(self) -> dict[str, Any]:
"""Return the entity state attributes."""
@@ -358,8 +460,6 @@ class AutomationEntity(ToggleEntity, RestoreEntity):
}
if self.action_script.supports_max:
attrs[ATTR_MAX] = self.action_script.max_runs
if self.unique_id is not None:
attrs[CONF_ID] = self.unique_id
return attrs
@property
@@ -681,6 +781,7 @@ class AutomationEntityConfig:
list_no: int
raw_blueprint_inputs: ConfigType | None
raw_config: ConfigType | None
validation_failed: bool
async def _prepare_automation_config(
@@ -695,9 +796,14 @@ async def _prepare_automation_config(
for list_no, config_block in enumerate(conf):
raw_config = cast(AutomationConfig, config_block).raw_config
raw_blueprint_inputs = cast(AutomationConfig, config_block).raw_blueprint_inputs
validation_failed = cast(AutomationConfig, config_block).validation_failed
automation_configs.append(
AutomationEntityConfig(
config_block, list_no, raw_blueprint_inputs, raw_config
config_block,
list_no,
raw_blueprint_inputs,
raw_config,
validation_failed,
)
)
@@ -713,9 +819,9 @@ def _automation_name(automation_config: AutomationEntityConfig) -> str:
async def _create_automation_entities(
hass: HomeAssistant, automation_configs: list[AutomationEntityConfig]
) -> list[AutomationEntity]:
) -> list[BaseAutomationEntity]:
"""Create automation entities from prepared configuration."""
entities: list[AutomationEntity] = []
entities: list[BaseAutomationEntity] = []
for automation_config in automation_configs:
config_block = automation_config.config_block
@@ -723,6 +829,16 @@ async def _create_automation_entities(
automation_id: str | None = config_block.get(CONF_ID)
name = _automation_name(automation_config)
if automation_config.validation_failed:
entities.append(
UnavailableAutomationEntity(
automation_id,
name,
automation_config.raw_config,
)
)
continue
initial_state: bool | None = config_block.get(CONF_INITIAL_STATE)
action_script = Script(
@@ -781,18 +897,18 @@ async def _create_automation_entities(
async def _async_process_config(
hass: HomeAssistant,
config: dict[str, Any],
component: EntityComponent[AutomationEntity],
component: EntityComponent[BaseAutomationEntity],
) -> None:
"""Process config and add automations."""
def automation_matches_config(
automation: AutomationEntity, config: AutomationEntityConfig
automation: BaseAutomationEntity, config: AutomationEntityConfig
) -> bool:
name = _automation_name(config)
return automation.name == name and automation.raw_config == config.raw_config
def find_matches(
automations: list[AutomationEntity],
automations: list[BaseAutomationEntity],
automation_configs: list[AutomationEntityConfig],
) -> tuple[set[int], set[int]]:
"""Find matches between a list of automation entities and a list of configurations.
@@ -838,7 +954,7 @@ async def _async_process_config(
return automation_matches, config_matches
automation_configs = await _prepare_automation_config(hass, config)
automations: list[AutomationEntity] = list(component.entities)
automations: list[BaseAutomationEntity] = list(component.entities)
# Find automations and configurations which have matches
automation_matches, config_matches = find_matches(automations, automation_configs)
@@ -860,8 +976,6 @@ async def _async_process_config(
entities = await _create_automation_entities(hass, updated_automation_configs)
await component.async_add_entities(entities)
return
async def _async_process_if(
hass: HomeAssistant, name: str, config: dict[str, Any]
@@ -965,7 +1079,7 @@ def websocket_config(
msg: dict[str, Any],
) -> None:
"""Get automation config."""
component: EntityComponent[AutomationEntity] = hass.data[DOMAIN]
component: EntityComponent[BaseAutomationEntity] = hass.data[DOMAIN]
automation = component.get_entity(msg["entity_id"])

View File

@@ -41,7 +41,15 @@ from .helpers import async_get_blueprints
PACKAGE_MERGE_HINT = "list"
_CONDITION_SCHEMA = vol.All(cv.ensure_list, [cv.CONDITION_SCHEMA])
_MINIMAL_PLATFORM_SCHEMA = vol.Schema(
{
CONF_ID: str,
CONF_ALIAS: cv.string,
vol.Optional(CONF_DESCRIPTION): cv.string,
},
extra=vol.ALLOW_EXTRA,
)
PLATFORM_SCHEMA = vol.All(
cv.deprecated(CONF_HIDE_ENTITY),
@@ -55,7 +63,7 @@ PLATFORM_SCHEMA = vol.All(
vol.Optional(CONF_INITIAL_STATE): cv.boolean,
vol.Optional(CONF_HIDE_ENTITY): cv.boolean,
vol.Required(CONF_TRIGGER): cv.TRIGGER_SCHEMA,
vol.Optional(CONF_CONDITION): _CONDITION_SCHEMA,
vol.Optional(CONF_CONDITION): cv.CONDITIONS_SCHEMA,
vol.Optional(CONF_VARIABLES): cv.SCRIPT_VARIABLES_SCHEMA,
vol.Optional(CONF_TRIGGER_VARIABLES): cv.SCRIPT_VARIABLES_SCHEMA,
vol.Required(CONF_ACTION): cv.SCRIPT_SCHEMA,
@@ -68,6 +76,7 @@ PLATFORM_SCHEMA = vol.All(
async def _async_validate_config_item(
hass: HomeAssistant,
config: ConfigType,
raise_on_errors: bool,
warn_on_errors: bool,
) -> AutomationConfig:
"""Validate config item."""
@@ -104,6 +113,15 @@ async def _async_validate_config_item(
)
return
def _minimal_config() -> AutomationConfig:
"""Try validating id, alias and description."""
minimal_config = _MINIMAL_PLATFORM_SCHEMA(config)
automation_config = AutomationConfig(minimal_config)
automation_config.raw_blueprint_inputs = raw_blueprint_inputs
automation_config.raw_config = raw_config
automation_config.validation_failed = True
return automation_config
if blueprint.is_blueprint_instance_config(config):
uses_blueprint = True
blueprints = async_get_blueprints(hass)
@@ -115,7 +133,9 @@ async def _async_validate_config_item(
"Failed to generate automation from blueprint: %s",
err,
)
raise
if raise_on_errors:
raise
return _minimal_config()
raw_blueprint_inputs = blueprint_inputs.config_with_inputs
@@ -130,7 +150,9 @@ async def _async_validate_config_item(
blueprint_inputs.inputs,
err,
)
raise HomeAssistantError from err
if raise_on_errors:
raise HomeAssistantError(err) from err
return _minimal_config()
automation_name = "Unnamed automation"
if isinstance(config, Mapping):
@@ -143,10 +165,16 @@ async def _async_validate_config_item(
validated_config = PLATFORM_SCHEMA(config)
except vol.Invalid as err:
_log_invalid_automation(err, automation_name, "could not be validated", config)
raise
if raise_on_errors:
raise
return _minimal_config()
automation_config = AutomationConfig(validated_config)
automation_config.raw_blueprint_inputs = raw_blueprint_inputs
automation_config.raw_config = raw_config
try:
validated_config[CONF_TRIGGER] = await async_validate_trigger_config(
automation_config[CONF_TRIGGER] = await async_validate_trigger_config(
hass, validated_config[CONF_TRIGGER]
)
except (
@@ -156,11 +184,14 @@ async def _async_validate_config_item(
_log_invalid_automation(
err, automation_name, "failed to setup triggers", validated_config
)
raise
if raise_on_errors:
raise
automation_config.validation_failed = True
return automation_config
if CONF_CONDITION in validated_config:
try:
validated_config[CONF_CONDITION] = await async_validate_conditions_config(
automation_config[CONF_CONDITION] = await async_validate_conditions_config(
hass, validated_config[CONF_CONDITION]
)
except (
@@ -170,10 +201,13 @@ async def _async_validate_config_item(
_log_invalid_automation(
err, automation_name, "failed to setup conditions", validated_config
)
raise
if raise_on_errors:
raise
automation_config.validation_failed = True
return automation_config
try:
validated_config[CONF_ACTION] = await script.async_validate_actions_config(
automation_config[CONF_ACTION] = await script.async_validate_actions_config(
hass, validated_config[CONF_ACTION]
)
except (
@@ -183,11 +217,11 @@ async def _async_validate_config_item(
_log_invalid_automation(
err, automation_name, "failed to setup actions", validated_config
)
raise
if raise_on_errors:
raise
automation_config.validation_failed = True
return automation_config
automation_config = AutomationConfig(validated_config)
automation_config.raw_blueprint_inputs = raw_blueprint_inputs
automation_config.raw_config = raw_config
return automation_config
@@ -196,6 +230,7 @@ class AutomationConfig(dict):
raw_config: dict[str, Any] | None = None
raw_blueprint_inputs: dict[str, Any] | None = None
validation_failed: bool = False
async def _try_async_validate_config_item(
@@ -204,7 +239,7 @@ async def _try_async_validate_config_item(
) -> AutomationConfig | None:
"""Validate config item."""
try:
return await _async_validate_config_item(hass, config, True)
return await _async_validate_config_item(hass, config, False, True)
except (vol.Invalid, HomeAssistantError):
return None
@@ -215,7 +250,7 @@ async def async_validate_config_item(
config: dict[str, Any],
) -> AutomationConfig | None:
"""Validate config item, called by EditAutomationConfigView."""
return await _async_validate_config_item(hass, config, False)
return await _async_validate_config_item(hass, config, True, False)
async def async_validate_config(hass: HomeAssistant, config: ConfigType) -> ConfigType:

View File

@@ -2,16 +2,22 @@
from __future__ import annotations
from asyncio import gather
from dataclasses import dataclass
from datetime import timedelta
from aiohttp import ClientSession
from async_timeout import timeout
from python_awair import Awair, AwairLocal
from python_awair.air_data import AirData
from python_awair.devices import AwairBaseDevice, AwairLocalDevice
from python_awair.exceptions import AuthError, AwairError
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_ACCESS_TOKEN, CONF_HOST, Platform
from homeassistant.const import (
CONF_ACCESS_TOKEN,
CONF_HOST,
Platform,
)
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryAuthFailed
from homeassistant.helpers.aiohttp_client import async_get_clientsession
@@ -23,7 +29,6 @@ from .const import (
LOGGER,
UPDATE_INTERVAL_CLOUD,
UPDATE_INTERVAL_LOCAL,
AwairResult,
)
PLATFORMS = [Platform.SENSOR]
@@ -72,6 +77,14 @@ async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
return unload_ok
@dataclass
class AwairResult:
"""Wrapper class to hold an awair device and set of air data."""
device: AwairBaseDevice
air_data: AirData
class AwairDataUpdateCoordinator(DataUpdateCoordinator[dict[str, AwairResult]]):
"""Define a wrapper class to update Awair data."""

View File

@@ -1,28 +1,9 @@
"""Constants for the Awair component."""
from __future__ import annotations
from dataclasses import dataclass
from datetime import timedelta
import logging
from python_awair.air_data import AirData
from python_awair.devices import AwairBaseDevice
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntityDescription,
SensorStateClass,
)
from homeassistant.const import (
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
CONCENTRATION_PARTS_PER_BILLION,
CONCENTRATION_PARTS_PER_MILLION,
LIGHT_LUX,
PERCENTAGE,
UnitOfSoundPressure,
UnitOfTemperature,
)
API_CO2 = "carbon_dioxide"
API_DUST = "dust"
API_HUMID = "humidity"
@@ -39,109 +20,7 @@ ATTRIBUTION = "Awair air quality sensor"
DOMAIN = "awair"
DUST_ALIASES = [API_PM25, API_PM10]
LOGGER = logging.getLogger(__package__)
UPDATE_INTERVAL_CLOUD = timedelta(minutes=5)
UPDATE_INTERVAL_LOCAL = timedelta(seconds=30)
@dataclass
class AwairRequiredKeysMixin:
"""Mixin for required keys."""
unique_id_tag: str
@dataclass
class AwairSensorEntityDescription(SensorEntityDescription, AwairRequiredKeysMixin):
"""Describes Awair sensor entity."""
SENSOR_TYPE_SCORE = AwairSensorEntityDescription(
key=API_SCORE,
icon="mdi:blur",
native_unit_of_measurement=PERCENTAGE,
name="Score",
unique_id_tag="score", # matches legacy format
state_class=SensorStateClass.MEASUREMENT,
)
SENSOR_TYPES: tuple[AwairSensorEntityDescription, ...] = (
AwairSensorEntityDescription(
key=API_HUMID,
device_class=SensorDeviceClass.HUMIDITY,
native_unit_of_measurement=PERCENTAGE,
name="Humidity",
unique_id_tag="HUMID", # matches legacy format
state_class=SensorStateClass.MEASUREMENT,
),
AwairSensorEntityDescription(
key=API_LUX,
device_class=SensorDeviceClass.ILLUMINANCE,
native_unit_of_measurement=LIGHT_LUX,
name="Illuminance",
unique_id_tag="illuminance",
state_class=SensorStateClass.MEASUREMENT,
),
AwairSensorEntityDescription(
key=API_SPL_A,
device_class=SensorDeviceClass.SOUND_PRESSURE,
native_unit_of_measurement=UnitOfSoundPressure.WEIGHTED_DECIBEL_A,
name="Sound level",
unique_id_tag="sound_level",
state_class=SensorStateClass.MEASUREMENT,
),
AwairSensorEntityDescription(
key=API_VOC,
icon="mdi:molecule",
native_unit_of_measurement=CONCENTRATION_PARTS_PER_BILLION,
name="Volatile organic compounds",
unique_id_tag="VOC", # matches legacy format
state_class=SensorStateClass.MEASUREMENT,
),
AwairSensorEntityDescription(
key=API_TEMP,
device_class=SensorDeviceClass.TEMPERATURE,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
name="Temperature",
unique_id_tag="TEMP", # matches legacy format
state_class=SensorStateClass.MEASUREMENT,
),
AwairSensorEntityDescription(
key=API_CO2,
device_class=SensorDeviceClass.CO2,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION,
name="Carbon dioxide",
unique_id_tag="CO2", # matches legacy format
state_class=SensorStateClass.MEASUREMENT,
),
)
SENSOR_TYPES_DUST: tuple[AwairSensorEntityDescription, ...] = (
AwairSensorEntityDescription(
key=API_PM25,
device_class=SensorDeviceClass.PM25,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
name="PM2.5",
unique_id_tag="PM25", # matches legacy format
state_class=SensorStateClass.MEASUREMENT,
),
AwairSensorEntityDescription(
key=API_PM10,
device_class=SensorDeviceClass.PM10,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
name="PM10",
unique_id_tag="PM10", # matches legacy format
state_class=SensorStateClass.MEASUREMENT,
),
)
@dataclass
class AwairResult:
"""Wrapper class to hold an awair device and set of air data."""
device: AwairBaseDevice
air_data: AirData

View File

@@ -11,7 +11,7 @@
"documentation": "https://www.home-assistant.io/integrations/awair",
"iot_class": "local_polling",
"loggers": ["python_awair"],
"requirements": ["python_awair==0.2.4"],
"requirements": ["python-awair==0.2.4"],
"zeroconf": [
{
"type": "_http._tcp.local.",

Some files were not shown because too many files have changed in this diff Show More