Compare commits

..

130 Commits

Author SHA1 Message Date
Paulus Schoutsen
1c88195d32 2023.2.2 (#87433) 2023-02-04 22:01:23 -05:00
Franck Nijhof
d82e409d8e Update black to 23.1.0 (#87188) 2023-02-04 21:26:10 -05:00
Paulus Schoutsen
3253eeca7a Bumped version to 2023.2.2 2023-02-04 21:08:23 -05:00
J. Nick Koston
f4f1b0dfc5 Bump aiohomekit to 2.4.6 (#87427)
fixes #86083

changelog: https://github.com/Jc2k/aiohomekit/compare/2.4.5...2.4.6
2023-02-04 21:08:15 -05:00
J. Nick Koston
1f08fc72bb Disable mopeka accelerometer sensors by default (#87420)
* Disable mopeka accelerometer sensors by default

These generate a significant amount of noise and are
only useful when placing the sensor. Disable them by
default. This not a breaking change because existing
preferences are preserved.

* adjust tests
2023-02-04 21:08:14 -05:00
J. Nick Koston
323ab97ff5 Ignore invalid zeroconf names from devices with broken firmwares (#87414) 2023-02-04 21:08:13 -05:00
Vincent Knoop Pathuis
93229196d8 Fix state class in Enphase Envoy (#87397)
* Change total_increasing to total

* As suggested in PR: only Last Seven Days TOTAL
2023-02-04 21:08:12 -05:00
Aarni Koskela
23e04ba891 Fix Ruuvi Gateway data being ignored when system is not using UTC time (#87384) 2023-02-04 21:08:11 -05:00
Jc2k
2d5ab5a0dc Fix exception when trying to poll a HomeKit device over Thread with no active encryption context (#87379)
Bump aiohomekit==2.4.5
2023-02-04 21:08:10 -05:00
Matthew Donoughe
30f63ae0ea Update pylutron-caseta to 0.18.1 (#87361)
update pylutron-caseta to 0.18.1
2023-02-04 21:08:09 -05:00
Luke
2d85890789 Bump oralb-ble to 0.17.2 (#87355) 2023-02-04 21:08:08 -05:00
Michael
c791a7c7fb Bump py-synologydsm-api to 2.1.2 (#87324)
fixes undefined
2023-02-04 21:08:07 -05:00
G Johansson
fe7c7001ad Fix code format issue in Yale Smart Alarm (#87323)
fixes undefined
2023-02-04 21:08:06 -05:00
Koen van Zuijlen
6d2a2b1c91 Fixed parser for zeversolar hardware version M10 (#87319)
fixes undefined
2023-02-04 21:08:05 -05:00
Artem Draft
1df7fcea09 Fix Bravia TV refreshing zero volume level (#87318)
fixes undefined
2023-02-04 21:08:04 -05:00
Franck Nijhof
681de9a516 Don't override icon in sensor group when device class is set (#87304) 2023-02-04 21:08:03 -05:00
Franck Nijhof
a5378ec9a8 Fix incorrect description in sensor group config flow (#87298) 2023-02-04 21:08:02 -05:00
Franck Nijhof
54687d6b56 Extend state class sensor warnings with expected values (#87294) 2023-02-04 21:08:01 -05:00
epenet
4c0ea397c8 Bump sfrbox-api to 0.0.6 (#87281) 2023-02-04 21:08:00 -05:00
epenet
9769a0f0ec Fix volume state class in renault (#87280) 2023-02-04 21:07:59 -05:00
starkillerOG
e78dd34a45 Bump reolink-aio to 0.3.4 (#87272) 2023-02-04 21:07:58 -05:00
G Johansson
6543a1169b Filesize timestamp remove state class (#87247)
fixes undefined
2023-02-04 21:07:57 -05:00
jjlawren
012ba55154 Handle failed Sonos subscriptions better (#87240)
Catch unsubscribe failure separately from ZGS poll
2023-02-04 21:07:56 -05:00
Brett Adams
e12425c229 Fix call values in Aussie Broadband (#87229)
Fixed calls values

Added lamda for International, Voicemail, and Other calls.
2023-02-04 21:07:55 -05:00
J. Nick Koston
5aaddf72e6 Add missing mopeka translations (#87421)
fixes #87163
2023-02-04 20:08:18 -05:00
Paulus Schoutsen
dbd8ffc282 2023.2.1 (#87221) 2023-02-02 20:52:38 -05:00
Paulus Schoutsen
372afc5c28 Bumped version to 2023.2.1 2023-02-02 16:48:09 -05:00
Karlie Meads
ed8a0ef0ea Fix disabled condition within an automation action (#87213)
fixes undefined
2023-02-02 16:48:04 -05:00
Michael
1d8f5b2e16 Bump py-synologydsm-api to 2.1.1 (#87211)
bump py-synologydsm-api to 2.1.1
2023-02-02 16:48:03 -05:00
Bram Kragten
75796e1f0f Update frontend to 20230202.0 (#87208) 2023-02-02 16:48:02 -05:00
mkmer
063bbe91d1 Bump AIOSomecomfort to 0.0.6 (#87203)
* Bump to 0.0.5

* Bump aiosomecomfort to 0.0.6

* lower case aiosomecomfort

* Fix other bad imports....

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-02-02 16:48:01 -05:00
mkmer
bfcae4e07b Add Reauth config flow to honeywell (#86170) 2023-02-02 16:48:00 -05:00
J. Nick Koston
be77d7daa5 Fix statistics graphs not loading with data_rate, electric_current, voltage, information, and unitless units (#87202)
* Add missing converts to recorder/statistics_during_period API

This was resulting in the stats graphs not loading on the frontend

* its in two places
2023-02-02 16:46:16 -05:00
starkillerOG
a58e4e0f88 Reolink unsubscribe webhook when first refresh fails (#87147)
* catch ValueError on webhook async_register

* add ONVIF to webhook_id

* Unsubscribe webhook when ConfigEntryNotReady for async_config_entry_first_refresh

* Revert catching ValueError
2023-02-02 16:46:15 -05:00
Dmitry Vlasov
56a583e6ac Add missing supported features to Z-Wave.Me siren (#87141) 2023-02-02 16:46:14 -05:00
epenet
517e89ab3c Add missing converters to recorder statistics (#87137) 2023-02-02 16:46:13 -05:00
epenet
ef8029ebbf Fix invalid state class in renault (#87135) 2023-02-02 16:46:12 -05:00
starkillerOG
264b6d4f77 Bump reolink-aio to 0.3.2 (#87121) 2023-02-02 16:46:11 -05:00
starkillerOG
b24d0a86ee Bump reolink_aio to 0.3.1 (#87118) 2023-02-02 16:46:10 -05:00
shbatm
8a7e2922c2 Support ISY994 Z-Wave motorized blinds as cover (#87102) 2023-02-02 16:46:09 -05:00
Franck Nijhof
5fe3adff57 2023.2.0 (#87101) 2023-02-01 19:33:00 +01:00
Joakim Sørensen
4641497806 Bump isort from 5.11.4 to 5.12.0 (#86890) 2023-02-01 18:47:22 +01:00
Franck Nijhof
eed15bb9fa Bumped version to 2023.2.0 2023-02-01 18:41:13 +01:00
Bram Kragten
7028aa7dac Update frontend to 20230201.0 (#87099) 2023-02-01 18:40:59 +01:00
Daniel Hjelseth Høyer
6c93b28374 Update pyTibber to 0.26.12 (#87098) 2023-02-01 18:40:55 +01:00
Paulus Schoutsen
65286d0544 Fix Assist skipping entities that are hidden or have entity category (#87096)
Skipping entities that are hidden or have entity category
2023-02-01 18:40:51 +01:00
J. Nick Koston
a678eee31b Reduce chance of queue overflow during schema migration (#87090)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-02-01 18:40:47 +01:00
mkmer
fe541583a8 Bump AIOAladdinConnect to 0.1.55 (#87086) 2023-02-01 18:40:44 +01:00
mkmer
eabcfa419e Bump AIOAladdinConnect to 0.1.54 (#86749) 2023-02-01 18:40:39 +01:00
Paulus Schoutsen
d57ce25287 Bumped version to 2023.2.0b9 2023-01-31 23:16:09 -05:00
Paulus Schoutsen
c786fe27d7 Guard what version we can install ESPHome updates with (#87059)
* Guard what version we can install ESPHome updates with

* Update homeassistant/components/esphome/dashboard.py
2023-01-31 23:16:04 -05:00
Paulus Schoutsen
fd3d76988e Trigger update of ESPHome update entity when static info updates (#87058)
Trigger update of update entity when static info updates
2023-01-31 23:16:03 -05:00
J. Nick Koston
c43174ee4b Ensure humidity is still exported to HomeKit when it is read-only (#87051)
* Ensure humidity is still exported to HomeKit when is cannot be set

We would only send humidity to HomeKit if the device supported
changing the humidity

* remove unrelated changes
2023-01-31 23:16:02 -05:00
Paulus Schoutsen
0bae47c992 Bumped version to 2023.2.0b8 2023-01-31 15:16:21 -05:00
Paulus Schoutsen
0d3a368a1f Improve JSON errors from HTTP view (#87042) 2023-01-31 15:16:16 -05:00
Franck Nijhof
c7871d13cf Fix Yamaha MusicCast zone sleep select entity (#87041) 2023-01-31 15:16:15 -05:00
J. Nick Koston
3d6ced2a16 Add a repair issue when using MariaDB is affected by MDEV-25020 (#87040)
closes https://github.com/home-assistant/core/issues/83787
2023-01-31 15:16:14 -05:00
Michael Hansen
2f403b712c Bump home-assistant-intents to 2023.1.31 (#87034) 2023-01-31 15:16:12 -05:00
mkmer
1caca91174 Honeywell Correct key name (#87018)
* Correct key name

* Logic error around setpoint and auto mode

* Set tempurature and setpoints correctly

* Only high/low in auto.
2023-01-31 15:16:11 -05:00
Franck Nijhof
1859dcf99b Only report invalid numeric value for sensors once (#87010) 2023-01-31 15:16:10 -05:00
Bouwe Westerdijk
c34eb1ad9d Bump plugwise to v0.27.5 (#87001)
fixes undefined
2023-01-31 15:16:08 -05:00
Paulus Schoutsen
be69e9579c Bump ESPHome Dashboard API 1.2.3 (#86997) 2023-01-31 15:16:07 -05:00
Michael Davie
ac6fa3275b Bump env_canada to 0.5.27 (#86996)
fixes undefined
2023-01-31 15:16:06 -05:00
Paulus Schoutsen
2f896c5df8 Bumped version to 2023.2.0b7 2023-01-30 23:47:52 -05:00
Paulus Schoutsen
c9e86ccd38 ESPHome handle remove password and no encryption (#86995)
* ESPHome handle remove password and no encryption

* Start reauth for invalid api password

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-01-30 23:47:48 -05:00
Paulus Schoutsen
8760227296 ESPHome discovered dashboard checks reauth flows (#86993) 2023-01-30 23:47:47 -05:00
Michael Hansen
edf02b70ea Prioritize entity names over area names in Assist matching (#86982)
* Refactor async_match_states

* Check entity name after state, before aliases

* Give entity name matches priority over area names

* Don't force result to have area

* Add area alias in tests

* Move name/area list creation back

* Clean up PR

* More clean up
2023-01-30 23:47:46 -05:00
shbatm
32a7ae6129 Bump pyisy to 3.1.11 (#86981)
* Bump pyisy to 3.1.10

* Bump pyisy to 3.1.11
2023-01-30 23:47:45 -05:00
Paulus Schoutsen
29056f1bd7 Check dashboard when showing reauth form (#86980) 2023-01-30 23:47:44 -05:00
puddly
01dea7773a Bump ZHA dependencies (#86979)
Bump ZHA dependency bellows from 0.34.6 to 0.34.7
2023-01-30 23:47:43 -05:00
Bram Kragten
688bba15ac Update frontend to 20230130.0 (#86978) 2023-01-30 23:47:42 -05:00
Franck Nijhof
f6230e2d71 Allow any state class when using the precipitation device class (#86977) 2023-01-30 23:47:41 -05:00
Steven Looman
6a9f06d36e Ensure a proper scope_id is given for IPv6 addresses when initializing the SSDP component (#86975)
fixes undefined
2023-01-30 23:47:40 -05:00
Steven Looman
dc50a6899a Fix error on empty location in ssdp messages (#86970) 2023-01-30 23:47:39 -05:00
Paul Bottein
d39d4d6b7f Uses PolledSmartEnergySummation for ZLinky (#86960) 2023-01-30 23:47:38 -05:00
ollo69
6a1710063a Catch AndroidTV exception on setup (#86819)
fixes undefined
2023-01-30 23:47:37 -05:00
puddly
565a9735fc ZHA config flow cleanup (#86742)
fixes undefined
2023-01-30 23:47:36 -05:00
mkmer
ba966bd0f7 Honeywell auto mode invalid attribute (#86728)
fixes undefined
2023-01-30 23:47:35 -05:00
Michael Hansen
c7b944ca75 Use device area id in intent matching (#86678)
* Use device area id when matching

* Normalize whitespace in response

* Add extra test entity
2023-01-30 23:47:34 -05:00
Paulus Schoutsen
0702314dcb Bumped version to 2023.2.0b6 2023-01-30 14:39:37 -05:00
Michael Hansen
81de0bba22 Performance improvements for Assist (#86966)
* Move hassil recognize into executor

* Bump hassil to 0.2.6

* Disable template parsing in name/area lists

* Don't iterate over hass.config.components directly
2023-01-30 14:38:27 -05:00
Paulus Schoutsen
0b015d46c3 Fix some mobile app sensor registration/update issues (#86965)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-01-30 14:38:26 -05:00
J. Nick Koston
0713e034b9 Silence spurious warnings about removing ix_states_entity_id with newer installs (#86961)
* Silence spurious warnings about removing ix_states_entity_id with newer installs

https://ptb.discord.com/channels/330944238910963714/427516175237382144/1069648035459641465

* Silence spurious warnings about removing ix_states_entity_id with newer installs

https://ptb.discord.com/channels/330944238910963714/427516175237382144/1069648035459641465
2023-01-30 14:38:25 -05:00
Mick Vleeshouwer
171acc22ca Fix ThreeWayHandle sensor in Overkiz integration (#86953)
Fix typo in sensor.py

Fixes https://github.com/home-assistant/core/issues/85913
2023-01-30 14:38:24 -05:00
J. Nick Koston
2e26a40bba Speed up live history setup if there is no pending data to commit (#86942) 2023-01-30 14:38:23 -05:00
Jan Bouwhuis
3f717ae854 Fix MQTT discovery failing after bad config update (#86935)
* Fix MQTT discovery failing after bad config update

* Update last discovery payload after update success

* Improve test, correct update assignment

* send_discovery_done to finally-catch vol.Error

* Just use try..finally

* Remove extra line

* use elif to avoid log confusion
2023-01-30 14:38:21 -05:00
Paulus Schoutsen
a491bfe84c Bumped version to 2023.2.0b5 2023-01-30 09:13:30 -05:00
Erik Montnemery
423acfa93b Drop minus sign on negative zero (#86939)
* Drop minus sign on negative zero

* Add tests
2023-01-30 09:13:26 -05:00
J. Nick Koston
f14771ccf2 Fix old indices not being removed in schema migration leading to slow MySQL queries (#86917)
fixes #83787
2023-01-30 09:13:25 -05:00
Thomas Schamm
07e9b0e98b Add Bosch SHC description and host form strings (#86897)
* Add description to setup SHC II. Add missing host info in reauth_confirm

* Remove template value in en.json
2023-01-30 09:13:24 -05:00
J. Nick Koston
0d27ee4fd8 Cache the names and area lists in the default agent (#86874)
* Cache the names and area lists in the default agent

fixes #86803

* add coverage to make sure the entity cache busts

* add areas test

* cover the last line
2023-01-30 09:13:22 -05:00
Robert Hillis
71b13d8f3e Address Google mail late review (#86847) 2023-01-30 09:13:21 -05:00
Tom Puttemans
63c218060b Ignore empty payloads from DSMR Reader (#86841)
* Ignore empty payloads from DSMR Reader

* Simplify empty payload handling

If the native value hasn't changed, requesting to store it won't have a performance impact.

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

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-01-30 09:13:20 -05:00
Paulus Schoutsen
8a9de2671b Bumped version to 2023.2.0b4 2023-01-28 22:07:57 -05:00
J. Nick Koston
85d5ea2eca Fix v32 schema migration when MySQL global.time_zone is configured with non-UTC timezone (#86867)
* Fix v32 schema migration when MySQL timezone is not UTC

* tweak
2023-01-28 22:07:54 -05:00
Martin Hjelmare
55b5b36c47 Fix tradfri air quality device class (#86861) 2023-01-28 22:07:52 -05:00
J. Nick Koston
c9cf3c29f8 Improve websocket throughput of state changes (#86855)
After the start event we tend to get an event storm of state
changes which can get the websocket behind. #86854 will
help with that a bit, but we can reduce the overhead
to build a state diff when the attributes have not
changed
2023-01-28 22:07:52 -05:00
Robert Hillis
6db9653a87 Fix D-Link attributes (#86842)
* Fix D-Link attributes

* fix blocking call
2023-01-28 22:07:51 -05:00
Paul Bottein
9adaf27064 Update frontend to 20230128.0 (#86838) 2023-01-28 22:07:50 -05:00
Paulus Schoutsen
69ed30f743 Bumped version to 2023.2.0b3 2023-01-27 22:54:05 -05:00
shbatm
d33373f6ee Check for missing ISY994 Z-Wave Properties (#86829)
* Check for missing Z-Wave Properties

* Fix black from mobile
2023-01-27 22:54:01 -05:00
Robert Hillis
bedf5fe6cd Fix D-Link config flow auth (#86824) 2023-01-27 22:54:00 -05:00
Bouwe Westerdijk
29eb7e8f9e Bump plugwise to v0.27.4 (#86812)
fixes undefined
2023-01-27 22:53:59 -05:00
J. Nick Koston
60b96f19b7 Fix Bluetooth discoveries missing between restarts (#86808)
* Fix Bluetooth discoveries missing between restarts

* do not load other integrations

* coverage
2023-01-27 22:53:58 -05:00
J. Nick Koston
0a6ce35e30 Chunk MariaDB and Postgresql data migration to avoid running out of buffer space (#86680)
* Chunk MariaDB data migration to avoid running out of buffer space

This will make the migration slower but since the innodb_buffer_pool_size
is using the defaul to 128M and not tuned to the db size there is a
risk of running out of buffer space for large databases

* Update homeassistant/components/recorder/migration.py

* hard code since bandit thinks its an injection

* Update homeassistant/components/recorder/migration.py

* guard against manually modified data/corrupt db

* adjust to 10k per chunk

* adjust to 50k per chunk

* memory still just fine at 250k

* but slower

* commit after each chunk to reduce lock pressure

* adjust

* set to 0 if null so we do not loop forever (this should only happen if the data is missing)

* set to 0 if null so we do not loop forever (this should only happen if the data is missing)

* tweak

* tweak

* limit cleanup

* lower limit to give some more buffer

* lower limit to give some more buffer

* where required for sqlite

* sqlite can wipe as many as needed with no limit

* limit on mysql only

* chunk postgres

* fix limit

* tweak

* fix reference

* fix

* tweak for ram

* postgres memory reduction

* defer cleanup

* fix

* same order
2023-01-27 22:53:57 -05:00
Paulus Schoutsen
6397cc5d04 Bumped version to 2023.2.0b2 2023-01-26 21:47:21 -05:00
Jesse Hills
b7311dc655 Remove esphome password from config flow data if not needed (#86763)
* Remove esphome password if not needed

* Add test

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-01-26 21:47:00 -05:00
Paulus Schoutsen
e20c7491c1 ESPHome update: Store reference to runtime data, not one of its values (#86762)
Store reference to runtime data, not one of its values
2023-01-26 21:46:59 -05:00
Aaron Bach
8cbefd5f97 Fix state class issues in Ambient PWS (#86758)
fixes undefined
2023-01-26 21:46:58 -05:00
Paulus Schoutsen
c7665b479a OpenAI: Fix device without model (#86754) 2023-01-26 21:46:57 -05:00
Shay Levy
4f2966674a Bump aioshelly to 5.3.1 (#86751) 2023-01-26 21:46:56 -05:00
Franck Nijhof
b464179eac Fix state classes for duration device class (#86727) 2023-01-26 21:46:55 -05:00
Franck Nijhof
cd59705c4b Remove gas device class from current sensor in dsmr_reader (#86725) 2023-01-26 21:46:54 -05:00
Martin Hjelmare
77bd23899f Bump python-matter-server to 2.0.2 (#86712) 2023-01-26 21:46:53 -05:00
David F. Mulcahey
d211603ba7 Update Inovelli Blue Series switch support in ZHA (#86711) 2023-01-26 21:46:52 -05:00
Erik Montnemery
1dc3bb6eb1 Terminate strings at NUL when recording states and events (#86687) 2023-01-26 21:46:51 -05:00
Robert Svensson
22afc7c7fb Fix missing interface key in deCONZ logbook (#86684)
fixes undefined
2023-01-26 21:46:50 -05:00
Paulus Schoutsen
ba82f13821 Make openai conversation prompt template more readable + test case (#86676) 2023-01-26 21:46:49 -05:00
MHFDoge
41add96bab Add known webostv button to list (#86674)
Add known button to list.
2023-01-26 21:46:48 -05:00
Andrey Kupreychik
c8c3f4bef6 Update ndms2_client to 0.1.2 (#86624)
fix https://github.com/home-assistant/core/issues/86379
fixes undefined
2023-01-26 21:46:47 -05:00
Patrick ZAJDA
8cb8ecdae9 Migrate Nuki to new entity naming style (#80021)
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2023-01-26 21:46:46 -05:00
Pascal Reeb
bd1371680f Add device registration to the Nuki component (#79806)
* Add device registration to the Nuki component

* Name is always given by the API

* implement pvizeli's suggestions

* switch device_registry to snake_case

* fix entity naming

* unify manufacturer names
2023-01-26 21:46:45 -05:00
Paulus Schoutsen
8f684e962a Bumped version to 2023.2.0b1 2023-01-25 23:00:35 -05:00
Paulus Schoutsen
07a1259db9 Add error handling for OpenAI (#86671)
* Add error handling for OpenAI

* Simplify area filtering

* better prompt
2023-01-25 23:00:28 -05:00
David F. Mulcahey
ea2bf34647 Bump ZHA quirks lib (#86669) 2023-01-25 23:00:27 -05:00
J. Nick Koston
a6fdf1d09a Correct units on mopeka battery voltage sensor (#86663) 2023-01-25 23:00:26 -05:00
Paulus Schoutsen
9ca04dbfa1 Google Assistant: unset agent on unload (#86635) 2023-01-25 23:00:24 -05:00
Paulus Schoutsen
e1c8dff536 Fix oauth2 error (#86634) 2023-01-25 23:00:23 -05:00
Joakim Plate
a1416b9044 Print expected device class units in error log (#86125) 2023-01-25 23:00:22 -05:00
Franck Nijhof
123aafd772 Bumped version to 2023.2.0b0 2023-01-25 18:39:20 +01:00
1249 changed files with 5408 additions and 11616 deletions

View File

@@ -205,7 +205,10 @@ omit =
homeassistant/components/discord/notify.py
homeassistant/components/dlib_face_detect/image_processing.py
homeassistant/components/dlib_face_identify/image_processing.py
homeassistant/components/dlink/__init__.py
homeassistant/components/dlink/data.py
homeassistant/components/dlink/entity.py
homeassistant/components/dlink/switch.py
homeassistant/components/dominos/*
homeassistant/components/doods/*
homeassistant/components/doorbird/__init__.py
@@ -998,7 +1001,6 @@ omit =
homeassistant/components/russound_rio/media_player.py
homeassistant/components/russound_rnet/media_player.py
homeassistant/components/rympro/__init__.py
homeassistant/components/rympro/coordinator.py
homeassistant/components/rympro/sensor.py
homeassistant/components/sabnzbd/__init__.py
homeassistant/components/sabnzbd/sensor.py
@@ -1146,6 +1148,7 @@ omit =
homeassistant/components/stream/core.py
homeassistant/components/stream/fmp4utils.py
homeassistant/components/stream/hls.py
homeassistant/components/stream/recorder.py
homeassistant/components/stream/worker.py
homeassistant/components/streamlabswater/*
homeassistant/components/suez_water/*

View File

@@ -30,8 +30,7 @@ on:
env:
CACHE_VERSION: 3
PIP_CACHE_VERSION: 3
MYPY_CACHE_VERSION: 3
HA_SHORT_VERSION: 2023.3
HA_SHORT_VERSION: 2023.2
DEFAULT_PYTHON: "3.10"
ALL_PYTHON_VERSIONS: "['3.10']"
PRE_COMMIT_CACHE: ~/.cache/pre-commit
@@ -188,7 +187,7 @@ jobs:
check-latest: true
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v3.2.4
uses: actions/cache@v3.2.3
with:
path: venv
key: >-
@@ -203,7 +202,7 @@ jobs:
pip install "$(cat requirements_test.txt | grep pre-commit)"
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache@v3.2.4
uses: actions/cache@v3.2.3
with:
path: ${{ env.PRE_COMMIT_CACHE }}
key: >-
@@ -232,22 +231,30 @@ jobs:
check-latest: true
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache/restore@v3.2.4
uses: actions/cache/restore@v3.2.3
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: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache/restore@v3.2.4
uses: actions/cache/restore@v3.2.3
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: Fail job if pre-commit cache restore failed
if: steps.cache-precommit.outputs.cache-hit != 'true'
run: |
echo "Failed to restore pre-commit environment from cache"
exit 1
- name: Run black (fully)
if: needs.info.outputs.test_full_suite == 'true'
run: |
@@ -278,22 +285,30 @@ jobs:
check-latest: true
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache/restore@v3.2.4
uses: actions/cache/restore@v3.2.3
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: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache/restore@v3.2.4
uses: actions/cache/restore@v3.2.3
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: Fail job if pre-commit cache restore failed
if: steps.cache-precommit.outputs.cache-hit != 'true'
run: |
echo "Failed to restore pre-commit environment from cache"
exit 1
- name: Register flake8 problem matcher
run: |
echo "::add-matcher::.github/workflows/matchers/flake8.json"
@@ -309,7 +324,6 @@ jobs:
. venv/bin/activate
shopt -s globstar
pre-commit run --hook-stage manual flake8 --files {homeassistant,tests}/components/${{ needs.info.outputs.integrations_glob }}/{*,**/*}
lint-ruff:
name: Check ruff
runs-on: ubuntu-latest
@@ -327,22 +341,30 @@ jobs:
check-latest: true
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache/restore@v3.2.4
uses: actions/cache/restore@v3.2.3
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: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache/restore@v3.2.4
uses: actions/cache/restore@v3.2.3
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: Fail job if pre-commit cache restore failed
if: steps.cache-precommit.outputs.cache-hit != 'true'
run: |
echo "Failed to restore pre-commit environment from cache"
exit 1
- name: Register ruff problem matcher
run: |
echo "::add-matcher::.github/workflows/matchers/ruff.json"
@@ -358,7 +380,6 @@ jobs:
. venv/bin/activate
shopt -s globstar
pre-commit run --hook-stage manual ruff --files {homeassistant,tests}/components/${{ needs.info.outputs.integrations_glob }}/{*,**/*}
lint-isort:
name: Check isort
runs-on: ubuntu-20.04
@@ -376,22 +397,30 @@ jobs:
check-latest: true
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache/restore@v3.2.4
uses: actions/cache/restore@v3.2.3
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: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache/restore@v3.2.4
uses: actions/cache/restore@v3.2.3
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: Fail job if pre-commit cache restore failed
if: steps.cache-precommit.outputs.cache-hit != 'true'
run: |
echo "Failed to restore pre-commit environment from cache"
exit 1
- name: Run isort
run: |
. venv/bin/activate
@@ -414,22 +443,30 @@ jobs:
check-latest: true
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache/restore@v3.2.4
uses: actions/cache/restore@v3.2.3
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: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache/restore@v3.2.4
uses: actions/cache/restore@v3.2.3
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: Fail job if pre-commit cache restore failed
if: steps.cache-precommit.outputs.cache-hit != 'true'
run: |
echo "Failed to restore pre-commit environment from cache"
exit 1
- name: Run pyupgrade (fully)
if: needs.info.outputs.test_full_suite == 'true'
@@ -538,7 +575,7 @@ jobs:
env.HA_SHORT_VERSION }}-$(date -u '+%Y-%m-%dT%H:%M:%s')" >> $GITHUB_OUTPUT
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache@v3.2.4
uses: actions/cache@v3.2.3
with:
path: venv
key: >-
@@ -546,7 +583,7 @@ jobs:
needs.info.outputs.python_cache_key }}
- name: Restore pip wheel cache
if: steps.cache-venv.outputs.cache-hit != 'true'
uses: actions/cache@v3.2.4
uses: actions/cache@v3.2.3
with:
path: ${{ env.PIP_CACHE }}
key: >-
@@ -600,13 +637,17 @@ jobs:
check-latest: true
- name: Restore full Python ${{ env.DEFAULT_PYTHON }} virtual environment
id: cache-venv
uses: actions/cache/restore@v3.2.4
uses: actions/cache/restore@v3.2.3
with:
path: venv
fail-on-cache-miss: true
key: >-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
needs.info.outputs.python_cache_key }}
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Run hassfest
run: |
. venv/bin/activate
@@ -632,13 +673,17 @@ jobs:
check-latest: true
- name: Restore base Python virtual environment
id: cache-venv
uses: actions/cache/restore@v3.2.4
uses: actions/cache/restore@v3.2.3
with:
path: venv
fail-on-cache-miss: true
key: >-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
needs.info.outputs.python_cache_key }}
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Run gen_requirements_all.py
run: |
. venv/bin/activate
@@ -665,13 +710,17 @@ jobs:
check-latest: true
- name: Restore full Python ${{ env.DEFAULT_PYTHON }} virtual environment
id: cache-venv
uses: actions/cache/restore@v3.2.4
uses: actions/cache/restore@v3.2.3
with:
path: venv
fail-on-cache-miss: true
key: >-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
needs.info.outputs.python_cache_key }}
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Register pylint problem matcher
run: |
echo "::add-matcher::.github/workflows/matchers/pylint.json"
@@ -707,33 +756,19 @@ jobs:
with:
python-version: ${{ env.DEFAULT_PYTHON }}
check-latest: true
- name: Generate partial mypy restore key
id: generate-mypy-key
run: |
mypy_version=$(cat requirements_test.txt | grep mypy | cut -d '=' -f 3)
echo "version=$mypy_version" >> $GITHUB_OUTPUT
echo "key=mypy-${{ env.MYPY_CACHE_VERSION }}-$mypy_version-${{
env.HA_SHORT_VERSION }}-$(date -u '+%Y-%m-%dT%H:%M:%s')" >> $GITHUB_OUTPUT
- name: Restore full Python ${{ env.DEFAULT_PYTHON }} virtual environment
id: cache-venv
uses: actions/cache/restore@v3.2.4
uses: actions/cache/restore@v3.2.3
with:
path: venv
fail-on-cache-miss: true
key: >-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
needs.info.outputs.python_cache_key }}
- name: Restore mypy cache
uses: actions/cache@v3.2.4
with:
path: .mypy_cache
key: >-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
steps.generate-mypy-key.outputs.key }}
restore-keys: |
${{ runner.os }}-${{ steps.python.outputs.python-version }}-mypy-${{
env.MYPY_CACHE_VERSION }}-${{ steps.generate-mypy-key.outputs.version }}-${{
env.HA_SHORT_VERSION }}-
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Register mypy problem matcher
run: |
echo "::add-matcher::.github/workflows/matchers/mypy.json"
@@ -775,13 +810,17 @@ jobs:
check-latest: true
- name: Restore full Python ${{ matrix.python-version }} virtual environment
id: cache-venv
uses: actions/cache/restore@v3.2.4
uses: actions/cache/restore@v3.2.3
with:
path: venv
fail-on-cache-miss: true
key: >-
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
needs.info.outputs.python_cache_key }}
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Run pip check
run: |
. venv/bin/activate
@@ -801,9 +840,8 @@ jobs:
- gen-requirements-all
- hassfest
- lint-black
- lint-isort
- lint-other
- lint-ruff
- lint-isort
- mypy
strategy:
fail-fast: false
@@ -829,12 +867,16 @@ jobs:
check-latest: true
- name: Restore full Python ${{ matrix.python-version }} virtual environment
id: cache-venv
uses: actions/cache/restore@v3.2.4
uses: actions/cache/restore@v3.2.3
with:
path: venv
fail-on-cache-miss: true
key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
needs.info.outputs.python_cache_key }}
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Register Python problem matcher
run: |
echo "::add-matcher::.github/workflows/matchers/python.json"
@@ -923,9 +965,8 @@ jobs:
- gen-requirements-all
- hassfest
- lint-black
- lint-isort
- lint-other
- lint-ruff
- lint-isort
- mypy
strategy:
fail-fast: false
@@ -951,12 +992,16 @@ jobs:
check-latest: true
- name: Restore full Python ${{ matrix.python-version }} virtual environment
id: cache-venv
uses: actions/cache/restore@v3.2.4
uses: actions/cache/restore@v3.2.3
with:
path: venv
fail-on-cache-miss: true
key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
needs.info.outputs.python_cache_key }}
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Register Python problem matcher
run: |
echo "::add-matcher::.github/workflows/matchers/python.json"

View File

@@ -42,7 +42,7 @@ jobs:
id: token
# Pinned to a specific version of the action for security reasons
# v1.7.0
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c
with:
app_id: ${{ secrets.ISSUE_TRIAGE_APP_ID }}
private_key: ${{ secrets.ISSUE_TRIAGE_APP_PEM }}

View File

@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.237
rev: v0.0.231
hooks:
- id: ruff
args:
@@ -20,7 +20,7 @@ repos:
- --remove-all-unused-imports
stages: [manual]
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.1.0
hooks:
- id: black
args:

14
.vscode/tasks.json vendored
View File

@@ -27,20 +27,6 @@
},
"problemMatcher": []
},
{
"label": "Pytest (changed tests only)",
"type": "shell",
"command": "pytest --timeout=10 --picked",
"group": {
"kind": "test",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Flake8",
"type": "shell",

View File

@@ -211,8 +211,8 @@ build.json @home-assistant/supervisor
/tests/components/configurator/ @home-assistant/core
/homeassistant/components/control4/ @lawtancool
/tests/components/control4/ @lawtancool
/homeassistant/components/conversation/ @home-assistant/core @synesthesiam
/tests/components/conversation/ @home-assistant/core @synesthesiam
/homeassistant/components/conversation/ @home-assistant/core
/tests/components/conversation/ @home-assistant/core
/homeassistant/components/coolmaster/ @OnFreund
/tests/components/coolmaster/ @OnFreund
/homeassistant/components/coronavirus/ @home-assistant/core
@@ -566,8 +566,8 @@ build.json @home-assistant/supervisor
/tests/components/integration/ @dgomes
/homeassistant/components/intellifire/ @jeeftor
/tests/components/intellifire/ @jeeftor
/homeassistant/components/intent/ @home-assistant/core @synesthesiam
/tests/components/intent/ @home-assistant/core @synesthesiam
/homeassistant/components/intent/ @home-assistant/core
/tests/components/intent/ @home-assistant/core
/homeassistant/components/intesishome/ @jnimmo
/homeassistant/components/ios/ @robbiet480
/tests/components/ios/ @robbiet480
@@ -1003,8 +1003,8 @@ build.json @home-assistant/supervisor
/tests/components/ruuvi_gateway/ @akx
/homeassistant/components/ruuvitag_ble/ @akx
/tests/components/ruuvitag_ble/ @akx
/homeassistant/components/rympro/ @OnFreund @elad-bar @maorcc
/tests/components/rympro/ @OnFreund @elad-bar @maorcc
/homeassistant/components/rympro/ @OnFreund
/tests/components/rympro/ @OnFreund
/homeassistant/components/sabnzbd/ @shaiu
/tests/components/sabnzbd/ @shaiu
/homeassistant/components/safe_mode/ @home-assistant/core

View File

@@ -19,7 +19,6 @@ coverage:
- homeassistant/components/*/intent.py
- homeassistant/components/*/logbook.py
- homeassistant/components/*/media_source.py
- homeassistant/components/*/recorder.py
- homeassistant/components/*/scene.py
patch:
default:
@@ -37,7 +36,6 @@ coverage:
- homeassistant/components/*/intent.py
- homeassistant/components/*/logbook.py
- homeassistant/components/*/media_source.py
- homeassistant/components/*/recorder.py
- homeassistant/components/*/scene.py
comment: false

View File

@@ -406,7 +406,6 @@ def async_enable_logging(
if (err_path_exists and os.access(err_log_path, os.W_OK)) or (
not err_path_exists and os.access(err_dir, os.W_OK)
):
err_handler: (
logging.handlers.RotatingFileHandler
| logging.handlers.TimedRotatingFileHandler

View File

@@ -2,7 +2,7 @@
"config": {
"abort": {
"reauth_successful": "\u041f\u043e\u0432\u0442\u043e\u0440\u043d\u0430\u0442\u0430 \u0430\u0432\u0442\u0435\u043d\u0442\u0438\u043a\u0430\u0446\u0438\u044f \u0431\u0435\u0448\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u0430",
"single_instance_allowed": "\u0412\u0435\u0447\u0435 \u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0430\u043d\u043e. \u0412\u044a\u0437\u043c\u043e\u0436\u043d\u0430 \u0435 \u0441\u0430\u043c\u043e \u0435\u0434\u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f."
"single_instance_allowed": "\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0430 \u0435 \u0441\u0430\u043c\u043e \u0435\u0434\u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043d\u0430 Abode."
},
"error": {
"cannot_connect": "\u041d\u0435\u0443\u0441\u043f\u0435\u0445 \u043f\u0440\u0438 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435"

View File

@@ -248,8 +248,7 @@ SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
state_class=SensorStateClass.MEASUREMENT,
metric_unit=UnitOfLength.METERS,
us_customary_unit=UnitOfLength.FEET,
value_fn=lambda data, unit: cast(float, data[unit][ATTR_VALUE]),
native_precision=0,
value_fn=lambda data, unit: round(cast(float, data[unit][ATTR_VALUE])),
),
AccuWeatherSensorDescription(
key="CloudCover",
@@ -301,10 +300,8 @@ SENSOR_TYPES: tuple[AccuWeatherSensorDescription, ...] = (
),
AccuWeatherSensorDescription(
key="PressureTendency",
device_class=SensorDeviceClass.ENUM,
icon="mdi:gauge",
name="Pressure tendency",
options=["falling", "rising", "steady"],
translation_key="pressure_tendency",
value_fn=lambda data, _: cast(str, data["LocalizedText"]).lower(),
),

View File

@@ -24,7 +24,6 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
# convert title and unique_id to string
if config_entry.version == 1:
if isinstance(config_entry.unique_id, int):
hass.config_entries.async_update_entry(
config_entry,
unique_id=str(config_entry.unique_id),

View File

@@ -1,6 +1,4 @@
"""Config flow to configure Agent devices."""
from contextlib import suppress
from agent import AgentConnectionError, AgentError
from agent.a import Agent
import voluptuous as vol
@@ -33,8 +31,10 @@ class AgentFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
server_origin = generate_url(host, port)
agent_client = Agent(server_origin, async_get_clientsession(self.hass))
with suppress(AgentConnectionError, AgentError):
try:
await agent_client.update()
except (AgentConnectionError, AgentError):
pass
await agent_client.close()

View File

@@ -3,7 +3,7 @@ from __future__ import annotations
from collections.abc import Callable
from dataclasses import dataclass
from typing import Any
from typing import Any, cast
from homeassistant.components.sensor import (
SensorDeviceClass,
@@ -19,10 +19,11 @@ from homeassistant.const import (
UnitOfPressure,
UnitOfTemperature,
)
from homeassistant.core import HomeAssistant, callback
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 AirlyDataUpdateCoordinator
@@ -61,7 +62,7 @@ PARALLEL_UPDATES = 1
class AirlySensorEntityDescription(SensorEntityDescription):
"""Class describing Airly sensor entities."""
attrs: Callable[[dict[str, Any]], dict[str, Any]] = lambda data: {}
value: Callable = round
SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
@@ -69,19 +70,12 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
key=ATTR_API_CAQI,
icon="mdi:air-filter",
name=ATTR_API_CAQI,
native_precision=0,
native_unit_of_measurement="CAQI",
attrs=lambda data: {
ATTR_LEVEL: data[ATTR_API_CAQI_LEVEL],
ATTR_ADVICE: data[ATTR_API_ADVICE],
ATTR_DESCRIPTION: data[ATTR_API_CAQI_DESCRIPTION],
},
),
AirlySensorEntityDescription(
key=ATTR_API_PM1,
device_class=SensorDeviceClass.PM1,
name="PM1.0",
native_precision=0,
name=ATTR_API_PM1,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
),
@@ -89,39 +83,28 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
key=ATTR_API_PM25,
device_class=SensorDeviceClass.PM25,
name="PM2.5",
native_precision=0,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
attrs=lambda data: {
ATTR_LIMIT: data[f"{ATTR_API_PM25}_{SUFFIX_LIMIT}"],
ATTR_PERCENT: round(data[f"{ATTR_API_PM25}_{SUFFIX_PERCENT}"]),
},
),
AirlySensorEntityDescription(
key=ATTR_API_PM10,
device_class=SensorDeviceClass.PM10,
name=ATTR_API_PM10,
native_precision=0,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
attrs=lambda data: {
ATTR_LIMIT: data[f"{ATTR_API_PM10}_{SUFFIX_LIMIT}"],
ATTR_PERCENT: round(data[f"{ATTR_API_PM10}_{SUFFIX_PERCENT}"]),
},
),
AirlySensorEntityDescription(
key=ATTR_API_HUMIDITY,
device_class=SensorDeviceClass.HUMIDITY,
name=ATTR_API_HUMIDITY.capitalize(),
native_precision=1,
native_unit_of_measurement=PERCENTAGE,
state_class=SensorStateClass.MEASUREMENT,
value=lambda value: round(value, 1),
),
AirlySensorEntityDescription(
key=ATTR_API_PRESSURE,
device_class=SensorDeviceClass.PRESSURE,
name=ATTR_API_PRESSURE.capitalize(),
native_precision=0,
native_unit_of_measurement=UnitOfPressure.HPA,
state_class=SensorStateClass.MEASUREMENT,
),
@@ -129,56 +112,36 @@ SENSOR_TYPES: tuple[AirlySensorEntityDescription, ...] = (
key=ATTR_API_TEMPERATURE,
device_class=SensorDeviceClass.TEMPERATURE,
name=ATTR_API_TEMPERATURE.capitalize(),
native_precision=1,
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
state_class=SensorStateClass.MEASUREMENT,
value=lambda value: round(value, 1),
),
AirlySensorEntityDescription(
key=ATTR_API_CO,
name="Carbon monoxide",
native_precision=0,
name=ATTR_API_CO,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
attrs=lambda data: {
ATTR_LIMIT: data[f"{ATTR_API_CO}_{SUFFIX_LIMIT}"],
ATTR_PERCENT: round(data[f"{ATTR_API_CO}_{SUFFIX_PERCENT}"]),
},
),
AirlySensorEntityDescription(
key=ATTR_API_NO2,
device_class=SensorDeviceClass.NITROGEN_DIOXIDE,
name="Nitrogen dioxide",
native_precision=0,
name=ATTR_API_NO2,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
attrs=lambda data: {
ATTR_LIMIT: data[f"{ATTR_API_NO2}_{SUFFIX_LIMIT}"],
ATTR_PERCENT: round(data[f"{ATTR_API_NO2}_{SUFFIX_PERCENT}"]),
},
),
AirlySensorEntityDescription(
key=ATTR_API_SO2,
device_class=SensorDeviceClass.SULPHUR_DIOXIDE,
name="Sulphur dioxide",
native_precision=0,
name=ATTR_API_SO2,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
attrs=lambda data: {
ATTR_LIMIT: data[f"{ATTR_API_SO2}_{SUFFIX_LIMIT}"],
ATTR_PERCENT: round(data[f"{ATTR_API_SO2}_{SUFFIX_PERCENT}"]),
},
),
AirlySensorEntityDescription(
key=ATTR_API_O3,
device_class=SensorDeviceClass.OZONE,
name="Ozone",
native_precision=0,
name=ATTR_API_O3,
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
state_class=SensorStateClass.MEASUREMENT,
attrs=lambda data: {
ATTR_LIMIT: data[f"{ATTR_API_O3}_{SUFFIX_LIMIT}"],
ATTR_PERCENT: round(data[f"{ATTR_API_O3}_{SUFFIX_PERCENT}"]),
},
),
)
@@ -227,15 +190,64 @@ class AirlySensor(CoordinatorEntity[AirlyDataUpdateCoordinator], SensorEntity):
self._attr_unique_id = (
f"{coordinator.latitude}-{coordinator.longitude}-{description.key}".lower()
)
self._attr_native_value = coordinator.data[description.key]
self._attr_extra_state_attributes = description.attrs(coordinator.data)
self._attrs: dict[str, Any] = {}
self.entity_description = description
@callback
def _handle_coordinator_update(self) -> None:
"""Handle updated data from the coordinator."""
self._attr_native_value = self.coordinator.data[self.entity_description.key]
self._attr_extra_state_attributes = self.entity_description.attrs(
self.coordinator.data
)
self.async_write_ha_state()
@property
def native_value(self) -> StateType:
"""Return the state."""
state = self.coordinator.data[self.entity_description.key]
return cast(StateType, self.entity_description.value(state))
@property
def extra_state_attributes(self) -> dict[str, Any]:
"""Return the state attributes."""
if self.entity_description.key == ATTR_API_CAQI:
self._attrs[ATTR_LEVEL] = self.coordinator.data[ATTR_API_CAQI_LEVEL]
self._attrs[ATTR_ADVICE] = self.coordinator.data[ATTR_API_ADVICE]
self._attrs[ATTR_DESCRIPTION] = self.coordinator.data[
ATTR_API_CAQI_DESCRIPTION
]
if self.entity_description.key == ATTR_API_PM25:
self._attrs[ATTR_LIMIT] = self.coordinator.data[
f"{ATTR_API_PM25}_{SUFFIX_LIMIT}"
]
self._attrs[ATTR_PERCENT] = round(
self.coordinator.data[f"{ATTR_API_PM25}_{SUFFIX_PERCENT}"]
)
if self.entity_description.key == ATTR_API_PM10:
self._attrs[ATTR_LIMIT] = self.coordinator.data[
f"{ATTR_API_PM10}_{SUFFIX_LIMIT}"
]
self._attrs[ATTR_PERCENT] = round(
self.coordinator.data[f"{ATTR_API_PM10}_{SUFFIX_PERCENT}"]
)
if self.entity_description.key == ATTR_API_CO:
self._attrs[ATTR_LIMIT] = self.coordinator.data[
f"{ATTR_API_CO}_{SUFFIX_LIMIT}"
]
self._attrs[ATTR_PERCENT] = round(
self.coordinator.data[f"{ATTR_API_CO}_{SUFFIX_PERCENT}"]
)
if self.entity_description.key == ATTR_API_NO2:
self._attrs[ATTR_LIMIT] = self.coordinator.data[
f"{ATTR_API_NO2}_{SUFFIX_LIMIT}"
]
self._attrs[ATTR_PERCENT] = round(
self.coordinator.data[f"{ATTR_API_NO2}_{SUFFIX_PERCENT}"]
)
if self.entity_description.key == ATTR_API_SO2:
self._attrs[ATTR_LIMIT] = self.coordinator.data[
f"{ATTR_API_SO2}_{SUFFIX_LIMIT}"
]
self._attrs[ATTR_PERCENT] = round(
self.coordinator.data[f"{ATTR_API_SO2}_{SUFFIX_PERCENT}"]
)
if self.entity_description.key == ATTR_API_O3:
self._attrs[ATTR_LIMIT] = self.coordinator.data[
f"{ATTR_API_O3}_{SUFFIX_LIMIT}"
]
self._attrs[ATTR_PERCENT] = round(
self.coordinator.data[f"{ATTR_API_O3}_{SUFFIX_PERCENT}"]
)
return self._attrs

View File

@@ -12,8 +12,8 @@
"data": {
"api_key": "API \u043a\u043b\u044e\u0447 \u0437\u0430 Airly",
"latitude": "\u0428\u0438\u0440\u0438\u043d\u0430",
"longitude": "\u0413\u0435\u043e\u0433\u0440\u0430\u0444\u0441\u043a\u0430 \u0434\u044a\u043b\u0436\u0438\u043d\u0430",
"name": "\u0418\u043c\u0435"
"longitude": "\u0414\u044a\u043b\u0436\u0438\u043d\u0430",
"name": "\u0418\u043c\u0435 \u043d\u0430 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f\u0442\u0430"
},
"description": "\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e\u0442\u043e \u043d\u0430 \u0432\u044a\u0437\u0434\u0443\u0445\u0430 Airly \u0417\u0430 \u0434\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0430\u0442\u0435 \u043a\u043b\u044e\u0447 \u0437\u0430 API, \u043e\u0442\u0438\u0434\u0435\u0442\u0435 \u043d\u0430 https://developer.airly.eu/register"
}

View File

@@ -88,7 +88,6 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
errors["base"] = "cannot_connect"
else:
self.hass.config_entries.async_update_entry(
self.entry,
data={

View File

@@ -2,7 +2,7 @@
"domain": "aladdin_connect",
"name": "Aladdin Connect",
"documentation": "https://www.home-assistant.io/integrations/aladdin_connect",
"requirements": ["AIOAladdinConnect==0.1.54"],
"requirements": ["AIOAladdinConnect==0.1.55"],
"codeowners": ["@mkmer"],
"iot_class": "cloud_polling",
"loggers": ["aladdin_connect"],

View File

@@ -3,9 +3,6 @@
"abort": {
"already_configured": "\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u0442\u043e \u0432\u0435\u0447\u0435 \u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0430\u043d\u043e"
},
"create_entry": {
"default": "\u0423\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0432\u044a\u0440\u0437\u0430\u043d \u0441 AlarmDecoder."
},
"error": {
"cannot_connect": "\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435"
},
@@ -22,30 +19,5 @@
}
}
}
},
"options": {
"step": {
"arm_settings": {
"data": {
"code_arm_required": "\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0435 \u043a\u043e\u0434 \u0437\u0430 \u043f\u043e\u0435\u043c\u0430\u043d\u0435 \u043f\u043e\u0434 \u043e\u0445\u0440\u0430\u043d\u0430"
}
},
"init": {
"data": {
"edit_select": "\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0430\u043d\u0435"
}
},
"zone_details": {
"data": {
"zone_name": "\u0418\u043c\u0435 \u043d\u0430 \u0437\u043e\u043d\u0430",
"zone_type": "\u0422\u0438\u043f \u0437\u043e\u043d\u0430"
}
},
"zone_select": {
"data": {
"zone_number": "\u041d\u043e\u043c\u0435\u0440 \u043d\u0430 \u0437\u043e\u043d\u0430"
}
}
}
}
}

View File

@@ -270,7 +270,6 @@ class Alert(Entity):
await self._send_notification_message(message)
async def _send_notification_message(self, message: Any) -> None:
if not self._notifiers:
return

View File

@@ -103,7 +103,6 @@ class Auth:
return dt.utcnow() < preemptive_expire_time
async def _async_request_new_token(self, lwa_params):
try:
session = aiohttp_client.async_get_clientsession(self.hass)
async with async_timeout.timeout(10):

View File

@@ -193,7 +193,6 @@ def resolve_slot_synonyms(key, request):
and "resolutionsPerAuthority" in request["resolutions"]
and len(request["resolutions"]["resolutionsPerAuthority"]) >= 1
):
# Extract all of the possible values from each authority with a
# successful match
possible_values = []

View File

@@ -4,8 +4,7 @@
"already_configured": "Apparaat is al geconfigureerd"
},
"error": {
"cannot_connect": "Kan geen verbinding maken",
"cannot_receive_deviceinfo": "Kon het MAC adres niet ophalen. Zorg ervoor dat het apparaat aanstaat"
"cannot_connect": "Kan geen verbinding maken"
},
"step": {
"user": {

View File

@@ -1,6 +1,4 @@
"""Apprise platform for notify component."""
from __future__ import annotations
import logging
import apprise
@@ -14,9 +12,7 @@ from homeassistant.components.notify import (
BaseNotificationService,
)
from homeassistant.const import CONF_URL
from homeassistant.core import HomeAssistant
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
_LOGGER = logging.getLogger(__name__)
@@ -30,11 +26,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
)
def get_service(
hass: HomeAssistant,
config: ConfigType,
discovery_info: DiscoveryInfoType | None = None,
) -> AppriseNotificationService | None:
def get_service(hass, config, discovery_info=None):
"""Get the Apprise notification service."""
# Create our Apprise Instance (reference our asset)
a_obj = apprise.Apprise()

View File

@@ -274,7 +274,6 @@ class AsusWrtRouter:
entity_reg, self._entry.entry_id
)
for entry in track_entries:
if entry.domain != TRACKER_DOMAIN:
continue
device_mac = format_mac(entry.unique_id)

View File

@@ -1,8 +1,5 @@
{
"config": {
"abort": {
"reauth_successful": "\u041f\u043e\u0432\u0442\u043e\u0440\u043d\u0430\u0442\u0430 \u0430\u0432\u0442\u0435\u043d\u0442\u0438\u043a\u0430\u0446\u0438\u044f \u0431\u0435\u0448\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u0430"
},
"error": {
"cannot_connect": "\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435",
"invalid_auth": "\u041d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u043e \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u044f\u0432\u0430\u043d\u0435"

View File

@@ -1,8 +1,5 @@
{
"config": {
"abort": {
"already_configured": "El servicio ya est\u00e1 configurado"
},
"error": {
"cannot_connect": "No se pudo conectar"
},

View File

@@ -1,8 +1,5 @@
{
"config": {
"abort": {
"already_configured": "A szolg\u00e1ltat\u00e1s m\u00e1r konfigur\u00e1lva van"
},
"error": {
"cannot_connect": "Sikertelen csatlakoz\u00e1s"
},

View File

@@ -1,8 +1,5 @@
{
"config": {
"abort": {
"already_configured": "Layanan sudah dikonfigurasi"
},
"error": {
"cannot_connect": "Gagal terhubung"
},

View File

@@ -1,8 +1,5 @@
{
"config": {
"abort": {
"already_configured": "Dienst is al ingesteld"
},
"error": {
"cannot_connect": "Kan geen verbinding maken"
},

View File

@@ -1,8 +1,5 @@
{
"config": {
"abort": {
"already_configured": "Us\u0142uga jest ju\u017c skonfigurowana"
},
"error": {
"cannot_connect": "Nie mo\u017cna nawi\u0105za\u0107 po\u0142\u0105czenia"
},

View File

@@ -1,8 +1,5 @@
{
"config": {
"abort": {
"already_configured": "O servi\u00e7o j\u00e1 est\u00e1 configurado"
},
"error": {
"cannot_connect": "Falha ao conectar"
},

View File

@@ -1,8 +1,5 @@
{
"config": {
"abort": {
"already_configured": "Slu\u017eba u\u017e je nakonfigurovan\u00e1"
},
"error": {
"cannot_connect": "Nepodarilo sa pripoji\u0165"
},

View File

@@ -78,6 +78,7 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
entity_registry_enabled_default=False,
state_class=SensorStateClass.TOTAL_INCREASING,
icon="mdi:phone-plus",
value=lambda x: x.get("calls"),
),
SensorValueEntityDescription(
key="sms",
@@ -101,6 +102,7 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
entity_registry_enabled_default=False,
state_class=SensorStateClass.TOTAL_INCREASING,
icon="mdi:phone",
value=lambda x: x.get("calls"),
),
SensorValueEntityDescription(
key="other",
@@ -108,6 +110,7 @@ SENSOR_DESCRIPTIONS: tuple[SensorValueEntityDescription, ...] = (
entity_registry_enabled_default=False,
state_class=SensorStateClass.TOTAL_INCREASING,
icon="mdi:phone",
value=lambda x: x.get("calls"),
),
# Generic sensors
SensorValueEntityDescription(

View File

@@ -438,7 +438,7 @@ def _create_auth_code_store() -> tuple[StoreResultType, RetrieveResultType]:
def store_result(client_id: str, result: Credentials) -> str:
"""Store flow result and return a code to retrieve it."""
if not isinstance(result, Credentials):
raise TypeError("result has to be a Credentials instance")
raise ValueError("result has to be a Credentials instance")
code = uuid.uuid4().hex
temp_results[(client_id, code)] = (

View File

@@ -1,6 +1,4 @@
"""AWS platform for notify component."""
from __future__ import annotations
import asyncio
import base64
import json
@@ -22,9 +20,7 @@ from homeassistant.const import (
CONF_PROFILE_NAME,
CONF_SERVICE,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.json import JSONEncoder
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
from .const import CONF_CONTEXT, CONF_CREDENTIAL_NAME, CONF_REGION, DATA_SESSIONS
@@ -37,11 +33,7 @@ async def get_available_regions(hass, service):
return await session.get_available_regions(service)
async def async_get_service(
hass: HomeAssistant,
config: ConfigType,
discovery_info: DiscoveryInfoType | None = None,
) -> AWSNotify | None:
async def async_get_service(hass, config, discovery_info=None):
"""Get the AWS notification service."""
if discovery_info is None:
_LOGGER.error("Please config aws notify platform in aws component")

View File

@@ -112,7 +112,6 @@ class AxisBinarySensor(AxisEventEntity, BinarySensorEntity):
self._attr_name = self.device.api.vapix.ports[event.id].name
elif event.group == EventGroup.MOTION:
for event_topic, event_data in (
(EventTopic.FENCE_GUARD, self.device.api.vapix.fence_guard),
(EventTopic.LOITERING_GUARD, self.device.api.vapix.loitering_guard),
@@ -120,7 +119,6 @@ class AxisBinarySensor(AxisEventEntity, BinarySensorEntity):
(EventTopic.OBJECT_ANALYTICS, self.device.api.vapix.object_analytics),
(EventTopic.MOTION_DETECTION_4, self.device.api.vapix.vmd4),
):
if (
event.topic_base == event_topic
and event_data

View File

@@ -10,7 +10,7 @@
"already_in_progress": "\u0412 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0442\u0435\u0447\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e.",
"cannot_connect": "\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435"
},
"flow_title": "{name} ({host})",
"flow_title": "Axis \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e: {name} ({host})",
"step": {
"user": {
"data": {

View File

@@ -1,11 +1,9 @@
"""Support for azure service bus notification."""
from __future__ import annotations
import json
import logging
from azure.servicebus import ServiceBusMessage
from azure.servicebus.aio import ServiceBusClient, ServiceBusSender
from azure.servicebus.aio import ServiceBusClient
from azure.servicebus.exceptions import (
MessagingEntityNotFoundError,
ServiceBusConnectionError,
@@ -21,9 +19,7 @@ from homeassistant.components.notify import (
BaseNotificationService,
)
from homeassistant.const import CONTENT_TYPE_JSON
from homeassistant.core import HomeAssistant
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
CONF_CONNECTION_STRING = "connection_string"
CONF_QUEUE_NAME = "queue"
@@ -51,15 +47,11 @@ PLATFORM_SCHEMA = vol.All(
_LOGGER = logging.getLogger(__name__)
def get_service(
hass: HomeAssistant,
config: ConfigType,
discovery_info: DiscoveryInfoType | None = None,
) -> ServiceBusNotificationService | None:
def get_service(hass, config, discovery_info=None):
"""Get the notification service."""
connection_string: str = config[CONF_CONNECTION_STRING]
queue_name: str | None = config.get(CONF_QUEUE_NAME)
topic_name: str | None = config.get(CONF_TOPIC_NAME)
connection_string = config[CONF_CONNECTION_STRING]
queue_name = config.get(CONF_QUEUE_NAME)
topic_name = config.get(CONF_TOPIC_NAME)
# Library can do synchronous IO when creating the clients.
# Passes in loop here, but can't run setup on the event loop.
@@ -67,11 +59,10 @@ def get_service(
connection_string, loop=hass.loop
)
client: ServiceBusSender | None = None
try:
if queue_name:
client = servicebus.get_queue_sender(queue_name)
elif topic_name:
else:
client = servicebus.get_topic_sender(topic_name)
except (ServiceBusConnectionError, MessagingEntityNotFoundError) as err:
_LOGGER.error(
@@ -81,7 +72,7 @@ def get_service(
)
return None
return ServiceBusNotificationService(client) if client else None
return ServiceBusNotificationService(client)
class ServiceBusNotificationService(BaseNotificationService):

View File

@@ -399,7 +399,6 @@ class BayesianBinarySensor(BinarySensorEntity):
observations_by_entity: dict[str, list[Observation]] = {}
for observation in self._observations:
if (key := observation.entity_id) is None:
continue
observations_by_entity.setdefault(key, []).append(observation)

View File

@@ -201,7 +201,7 @@
"on": "Problem"
},
"running": {
"off": "L\u00e4uft nicht",
"off": "Nicht ausgef\u00fchrt",
"on": "L\u00e4uft"
},
"safety": {

View File

@@ -164,7 +164,10 @@ class BlackbirdZone(MediaPlayerEntity):
return
self._attr_state = MediaPlayerState.ON if state.power else MediaPlayerState.OFF
idx = state.av
self._attr_source = self._source_id_name.get(idx)
if idx in self._source_id_name:
self._attr_source = self._source_id_name[idx]
else:
self._attr_source = None
@property
def media_title(self):

View File

@@ -5,7 +5,7 @@
},
"error": {
"cannot_connect": "\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435",
"invalid_auth": "\u041d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u0430 \u0430\u0432\u0442\u0435\u043d\u0442\u0438\u043a\u0430\u0446\u0438\u044f",
"invalid_auth": "\u041d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u043e \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u044f\u0432\u0430\u043d\u0435",
"unknown": "\u041d\u0435\u043e\u0447\u0430\u043a\u0432\u0430\u043d\u0430 \u0433\u0440\u0435\u0448\u043a\u0430"
},
"step": {

View File

@@ -71,14 +71,16 @@ class BlinkStickLight(LightEntity):
"""Turn the device on."""
if ATTR_HS_COLOR in kwargs:
self._attr_hs_color = kwargs[ATTR_HS_COLOR]
brightness: int = kwargs.get(ATTR_BRIGHTNESS, 255)
self._attr_brightness = brightness
self._attr_is_on = bool(brightness)
if ATTR_BRIGHTNESS in kwargs:
self._attr_brightness = kwargs[ATTR_BRIGHTNESS]
else:
self._attr_brightness = 255
assert self.brightness is not None
self._attr_is_on = self.brightness > 0
assert self.hs_color
rgb_color = color_util.color_hsv_to_RGB(
self.hs_color[0], self.hs_color[1], brightness / 255 * 100
self.hs_color[0], self.hs_color[1], self.brightness / 255 * 100
)
self._stick.set_color(red=rgb_color[0], green=rgb_color[1], blue=rgb_color[2])

View File

@@ -396,7 +396,6 @@ class BluesoundPlayer(MediaPlayerEntity):
_LOGGER.debug("Calling URL: %s", url)
try:
async with async_timeout.timeout(125):
response = await self._polling_session.get(
url, headers={CONNECTION: KEEP_ALIVE}

View File

@@ -85,7 +85,7 @@ def _dispatch_bleak_callback(
"""Dispatch the callback."""
if not callback:
# Callback destroyed right before being called, ignore
return
return # pragma: no cover
if (uuids := filters.get(FILTER_UUIDS)) and not uuids.intersection(
advertisement_data.service_uuids

View File

@@ -12,7 +12,6 @@ from home_assistant_bluetooth import BluetoothServiceInfoBleak
from homeassistant.util.dt import monotonic_time_coarse
if TYPE_CHECKING:
from .manager import BluetoothManager

View File

@@ -285,7 +285,7 @@ class PassiveBluetoothDataProcessor(Generic[_T]):
if not isinstance(new_data, PassiveBluetoothDataUpdate):
self.last_update_success = False # type: ignore[unreachable]
raise TypeError(
raise ValueError(
f"The update_method for {self.coordinator.name} returned"
f" {new_data} instead of a PassiveBluetoothDataUpdate"
)

View File

@@ -1,16 +1,5 @@
{
"config": {
"flow_title": "{name}",
"step": {
"bluetooth_confirm": {
"description": "Vai v\u0113laties iestat\u012bt {name}?"
},
"user": {
"data": {
"address": "Ier\u012bce"
},
"description": "Izv\u0113lieties ier\u012bci, kuru iestat\u012bt"
}
}
"flow_title": "{name}"
}
}

View File

@@ -5,7 +5,7 @@
},
"error": {
"cannot_connect": "\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435",
"invalid_auth": "\u041d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u0430 \u0430\u0432\u0442\u0435\u043d\u0442\u0438\u043a\u0430\u0446\u0438\u044f",
"invalid_auth": "\u041d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u043e \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u044f\u0432\u0430\u043d\u0435",
"unknown": "\u041d\u0435\u043e\u0447\u0430\u043a\u0432\u0430\u043d\u0430 \u0433\u0440\u0435\u0448\u043a\u0430"
},
"flow_title": "{name} ({host})",

View File

@@ -92,7 +92,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
VERSION = 1
info: dict[str, str | None]
host: str
host: str | None = None
async def async_step_reauth(self, entry_data: Mapping[str, Any]) -> FlowResult:
"""Perform reauth upon an API authentication error."""
@@ -107,8 +107,8 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
step_id="reauth_confirm",
data_schema=HOST_SCHEMA,
)
self.host = user_input[CONF_HOST]
self.info = await self._get_info(self.host)
self.host = host = user_input[CONF_HOST]
self.info = await self._get_info(host)
return await self.async_step_credentials()
async def async_step_user(
@@ -117,17 +117,18 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle the initial step."""
errors: dict[str, str] = {}
if user_input is not None:
self.host = user_input[CONF_HOST]
host = user_input[CONF_HOST]
try:
self.info = await self._get_info(self.host)
self.info = info = await self._get_info(host)
except SHCConnectionError:
errors["base"] = "cannot_connect"
except Exception: # pylint: disable=broad-except
_LOGGER.exception("Unexpected exception")
errors["base"] = "unknown"
else:
await self.async_set_unique_id(self.info["unique_id"])
self._abort_if_unique_id_configured({CONF_HOST: self.host})
await self.async_set_unique_id(info["unique_id"])
self._abort_if_unique_id_configured({CONF_HOST: host})
self.host = host
return await self.async_step_credentials()
return self.async_show_form(

View File

@@ -95,7 +95,6 @@ async def async_setup_entry(
session: SHCSession = hass.data[DOMAIN][config_entry.entry_id][DATA_SESSION]
for switch in session.device_helper.smart_plugs:
entities.append(
SHCSwitch(
device=switch,
@@ -113,7 +112,6 @@ async def async_setup_entry(
)
for switch in session.device_helper.light_switches:
entities.append(
SHCSwitch(
device=switch,
@@ -124,7 +122,6 @@ async def async_setup_entry(
)
for switch in session.device_helper.smart_plugs_compact:
entities.append(
SHCSwitch(
device=switch,
@@ -135,7 +132,6 @@ async def async_setup_entry(
)
for switch in session.device_helper.camera_eyes:
entities.append(
SHCSwitch(
device=switch,
@@ -146,7 +142,6 @@ async def async_setup_entry(
)
for switch in session.device_helper.camera_360:
entities.append(
SHCSwitch(
device=switch,

View File

@@ -12,9 +12,6 @@
"flow_title": "Bosch SHC: {name}",
"step": {
"reauth_confirm": {
"data": {
"host": "\u0425\u043e\u0441\u0442"
},
"title": "\u041f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u044f\u0432\u0430\u043d\u0435 \u043d\u0430 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f\u0442\u0430"
},
"user": {

View File

@@ -14,7 +14,7 @@
"flow_title": "Bosch SHC: {name}",
"step": {
"confirm_discovery": {
"description": "Smart Home Controller I: Prem el bot\u00f3 de la part frontal/lateral fins que el LED parpellegi.\nSmart Home Controller II: Prem el bot\u00f3 de funci\u00f3 breument. Els LEDs d'acc\u00e9s al n\u00favol i de connexi\u00f3 comen\u00e7aran a parpellejar.\nEl dispositiu est\u00e0 llest per a la vinculaci\u00f3.\n\nPreparat per continuar la configuraci\u00f3 de {model} @ {host} amb Home Assistant?"
"description": "Prem el bot\u00f3 de la part frontal/lateral del controlador Bosh Smart Home fins que el LED parpellegi.\nPreparat per continuar la configuraci\u00f3 de {model} @ {host} amb Home Assistant?"
},
"credentials": {
"data": {
@@ -22,9 +22,6 @@
}
},
"reauth_confirm": {
"data": {
"host": "Amfitri\u00f3"
},
"description": "La integraci\u00f3 bosch_shc ha de tornar a autenticar el teu compte",
"title": "Reautenticaci\u00f3 de la integraci\u00f3"
},

View File

@@ -14,7 +14,7 @@
"flow_title": "Bosch SHC: {name}",
"step": {
"confirm_discovery": {
"description": "Smart Home Controller I: Bitte dr\u00fccke die Taste auf der Vorderseite, bis die LED zu blinken beginnt.\nSmart Home Controller II: Dr\u00fccke kurz die Funktionstaste. Cloud- und Netzwerk-Lampen beginnen orange zu blinken.\nDas Ger\u00e4t ist nun bereit f\u00fcr das Pairing.\n\nBist du bereit, mit der Einrichtung von {model} @ {host} mit Home Assistant fortzufahren?"
"description": "Smart Home Controller I: Bitte dr\u00fccke die frontseitige Taste, bis die LED zu blinken beginnt.\nSmart Home Controller II: Dr\u00fccke kurz die Funktionstaste. Die Cloud- und Netzwerkleuchten beginnen orange zu blinken.\nDas Ger\u00e4t ist nun f\u00fcr die Kopplung bereit.\n\nBist du bereit, mit der Einrichtung von {model} @ {host} in Home Assistant fortzufahren?"
},
"credentials": {
"data": {
@@ -22,11 +22,11 @@
}
},
"reauth_confirm": {
"description": "Die bosch_shc Integration muss dein Konto neu authentifizieren",
"title": "Integration erneut authentifizieren",
"data": {
"host": "Host"
},
"description": "Die bosch_shc Integration muss dein Konto neu authentifizieren",
"title": "Integration erneut authentifizieren"
}
},
"user": {
"data": {

View File

@@ -22,11 +22,11 @@
}
},
"reauth_confirm": {
"description": "The bosch_shc integration needs to re-authenticate your account",
"title": "Reauthenticate Integration",
"data": {
"host": "Host"
},
"description": "The bosch_shc integration needs to re-authenticate your account",
"title": "Reauthenticate Integration"
}
},
"user": {
"data": {

View File

@@ -14,7 +14,7 @@
"flow_title": "Bosch SHC: {name}",
"step": {
"confirm_discovery": {
"description": "Smart Home Controller I: por favor, pulsa el bot\u00f3n frontal hasta que el LED comience a parpadear.\nSmart Home Controller II: pulsa el bot\u00f3n de funci\u00f3n brevemente. Las luces de la red y la nube comienzan a parpadear en naranja.\nEl dispositivo ya est\u00e1 listo para emparejarse. \n\n\u00bfPreparado para continuar configurando {model} @ {host} con Home Assistant?"
"description": "Por favor, pulsa el bot\u00f3n frontal del Smart Home Controller de Bosch hasta que el LED empiece a parpadear.\n\u00bfPreparado para seguir configurando {model} @ {host} con Home Assistant?"
},
"credentials": {
"data": {
@@ -22,9 +22,6 @@
}
},
"reauth_confirm": {
"data": {
"host": "Host"
},
"description": "La integraci\u00f3n bosch_shc necesita volver a autentificar tu cuenta",
"title": "Volver a autenticar la integraci\u00f3n"
},

View File

@@ -14,7 +14,7 @@
"flow_title": "Bosch SHC: {name}",
"step": {
"confirm_discovery": {
"description": "Smart Home Controller I: vajuta esik\u00fclje nuppu kuni LED hakkab vilkuma.\nSmart Home Controller II: vajuta l\u00fchidalt funktsiooninuppu. Pilve- ja v\u00f5rgutuled hakkavad oran\u017eilt vilkuma.\nSeade on n\u00fc\u00fcd sidumiseks valmis.\n\nKas oled valmis j\u00e4tkama {model} @ {host} seadistamist Home Assistantiga?"
"description": "Vajuta palun Bosch Smart Home Controlleri esik\u00fclje nuppu kuni LED hakkab vilkuma.\n Kas oled valmis j\u00e4tkama {model} @ {host} seadistamist Home Assistanti abil?"
},
"credentials": {
"data": {
@@ -22,9 +22,6 @@
}
},
"reauth_confirm": {
"data": {
"host": "Host"
},
"description": "Bosch_shc sidumine peab konto uuesti autentima.",
"title": "Taastuvastamine"
},

View File

@@ -14,7 +14,7 @@
"flow_title": "Bosch SHC: {name}",
"step": {
"confirm_discovery": {
"description": "Smart Home Controller I: Tekan tombol sisi depan hingga LED mulai berkedip.\nSmart Home Controller II: Tekan tombol fungsi sebentar. Lampu cloud dan jaringan mulai berkedip oranye.\nPerangkat sekarang siap untuk dipasangkan.\n\nSiap untuk melanjutkan penyiapan {model} @ {host} dengan Home Assistant?"
"description": "Tekan tombol sisi depan Bosch Smart Home Controller hingga LED mulai berkedip.\nSiap melanjutkan penyiapan {model} @ {host} dengan Home Assistant?"
},
"credentials": {
"data": {
@@ -22,9 +22,6 @@
}
},
"reauth_confirm": {
"data": {
"host": "Host"
},
"description": "Integrasi bosch_shc perlu mengautentikasi ulang akun Anda",
"title": "Autentikasi Ulang Integrasi"
},

View File

@@ -14,7 +14,7 @@
"flow_title": "Bosch SHC: {name}",
"step": {
"confirm_discovery": {
"description": "Smart Home Controller I: Trykk p\u00e5 knappen p\u00e5 forsiden til LED begynner \u00e5 blinke.\n Smart Home Controller II: Trykk kort p\u00e5 funksjonsknappen. Sky- og nettverkslys begynner \u00e5 blinke oransje.\n Enheten er n\u00e5 klar til \u00e5 bli paret. \n\n Er du klar til \u00e5 fortsette \u00e5 konfigurere {model} @ {host} med Home Assistant?"
"description": "Trykk p\u00e5 Bosch Smart Home Controller-frontknappen til LED-lampen begynner \u00e5 blinke.\n Klar til \u00e5 fortsette \u00e5 konfigurere {model} @ {host} med Home Assistant?"
},
"credentials": {
"data": {
@@ -22,9 +22,6 @@
}
},
"reauth_confirm": {
"data": {
"host": "Vert"
},
"description": "Bosch_shc-integrasjonen m\u00e5 godkjenne kontoen din p\u00e5 nytt",
"title": "Godkjenne integrering p\u00e5 nytt"
},

View File

@@ -14,7 +14,7 @@
"flow_title": "Bosch SHC: {name}",
"step": {
"confirm_discovery": {
"description": "Smart Home Controller I: Por favor, pressione o bot\u00e3o frontal at\u00e9 que o LED comece a piscar.\n Smart Home Controller II: Pressione brevemente o bot\u00e3o de fun\u00e7\u00e3o. As luzes da nuvem e da rede come\u00e7am a piscar em laranja.\n O dispositivo agora est\u00e1 pronto para ser emparelhado. \n\n Pronto para continuar a configurar {model} @ {host} com o Home Assistant?"
"description": "Pressione o bot\u00e3o frontal do Bosch Smart Home Controller at\u00e9 que o LED comece a piscar.\n Pronto para continuar a configurar {model} @ {host} com o Home Assistant?"
},
"credentials": {
"data": {
@@ -22,9 +22,6 @@
}
},
"reauth_confirm": {
"data": {
"host": "Host"
},
"description": "A integra\u00e7\u00e3o bosch_shc precisa re-autenticar sua conta",
"title": "Reautenticar Integra\u00e7\u00e3o"
},

View File

@@ -14,7 +14,7 @@
"flow_title": "Bosch SHC: {name}",
"step": {
"confirm_discovery": {
"description": "Smart Home Controller I: \u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435, \u043f\u043e\u043a\u0430 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u043d\u0435 \u043d\u0430\u0447\u043d\u0435\u0442 \u043c\u0438\u0433\u0430\u0442\u044c.\nSmart Home Controller II: \u041a\u0440\u0430\u0442\u043a\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443. \u0418\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043e\u0431\u043b\u0430\u043a\u0430 \u0438 \u0441\u0435\u0442\u0438 \u043d\u0430\u0447\u043d\u0443\u0442 \u043c\u0438\u0433\u0430\u0442\u044c \u043e\u0440\u0430\u043d\u0436\u0435\u0432\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c.\n\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0433\u043e\u0442\u043e\u0432\u043e \u043a \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044e.\n\n\u0413\u043e\u0442\u043e\u0432\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 {model} @ {host}?"
"description": "\u0423\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0439\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043f\u043e\u043a\u0430 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043d\u044b\u0435 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u043d\u0435 \u043d\u0430\u0447\u043d\u0443\u0442 \u043c\u0438\u0433\u0430\u0442\u044c.\n\u0413\u043e\u0442\u043e\u0432\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 Home Assistant \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 {model} @ {host}?"
},
"credentials": {
"data": {
@@ -22,9 +22,6 @@
}
},
"reauth_confirm": {
"data": {
"host": "\u0425\u043e\u0441\u0442"
},
"description": "\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u0430\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 Bosch SHC",
"title": "\u041f\u043e\u0432\u0442\u043e\u0440\u043d\u0430\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f"
},

View File

@@ -14,7 +14,7 @@
"flow_title": "Bosch SHC: {name}",
"step": {
"confirm_discovery": {
"description": "Smart Home Controller I: Stla\u010dte pros\u00edm tla\u010didlo na prednej strane, k\u00fdm LED neza\u010dne blika\u0165.\n Smart Home Controller II: Kr\u00e1tko stla\u010dte funk\u010dn\u00e9 tla\u010didlo. Kontrolky cloudu a siete za\u010dn\u00fa blika\u0165 na oran\u017eovo.\n Zariadenie je teraz pripraven\u00e9 na sp\u00e1rovanie. \n\n Ste pripraven\u00ed pokra\u010dova\u0165 v nastavovan\u00ed {model} @ {host} pomocou Home Assistant?"
"description": "Stla\u010dte tla\u010didlo na prednej strane ovl\u00e1da\u010da Bosch Smart Home Controller, k\u00fdm LED neza\u010dne blika\u0165.\n Ste pripraven\u00ed pokra\u010dova\u0165 v nastavovan\u00ed {model} @ {host} pomocou Home Assistant?"
},
"credentials": {
"data": {
@@ -22,9 +22,6 @@
}
},
"reauth_confirm": {
"data": {
"host": "Hostite\u013e"
},
"description": "Integr\u00e1cia bosch_shc mus\u00ed znova overi\u0165 v\u00e1\u0161 \u00fa\u010det",
"title": "Znova overi\u0165 integr\u00e1ciu"
},

View File

@@ -22,9 +22,6 @@
}
},
"reauth_confirm": {
"data": {
"host": "\u4e3b\u6a5f\u7aef"
},
"description": "bosch_shc \u6574\u5408\u9700\u8981\u91cd\u65b0\u8a8d\u8b49\u60a8\u7684\u5e33\u865f",
"title": "\u91cd\u65b0\u8a8d\u8b49\u6574\u5408"
},

View File

@@ -171,7 +171,7 @@ class BraviaTVCoordinator(DataUpdateCoordinator[None]):
async def async_update_volume(self) -> None:
"""Update volume information."""
volume_info = await self.client.get_volume_info()
if volume_level := volume_info.get("volume"):
if (volume_level := volume_info.get("volume")) is not None:
self.volume_level = volume_level / 100
self.volume_muted = volume_info.get("mute", False)
self.volume_target = volume_info.get("target")

View File

@@ -60,7 +60,7 @@ class BroadlinkDevice:
@property
def available(self):
"""Return True if the device is available."""
if self.update_manager is None:
if self.update_manager is None: # pragma: no cover
return False
return self.update_manager.available

View File

@@ -2,13 +2,13 @@
"config": {
"abort": {
"already_configured": "\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u0442\u043e \u0432\u0435\u0447\u0435 \u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0430\u043d\u043e",
"cannot_connect": "\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435",
"cannot_connect": "\u041d\u0435\u0443\u0441\u043f\u0435\u0445 \u043f\u0440\u0438 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435",
"invalid_host": "\u041d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u043e \u0438\u043c\u0435 \u043d\u0430 \u0445\u043e\u0441\u0442 \u0438\u043b\u0438 IP \u0430\u0434\u0440\u0435\u0441",
"not_supported": "\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u0442\u043e \u043d\u0435 \u0441\u0435 \u043f\u043e\u0434\u0434\u044a\u0440\u0436\u0430",
"unknown": "\u041d\u0435\u043e\u0447\u0430\u043a\u0432\u0430\u043d\u0430 \u0433\u0440\u0435\u0448\u043a\u0430"
},
"error": {
"cannot_connect": "\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435",
"cannot_connect": "\u041d\u0435\u0443\u0441\u043f\u0435\u0445 \u043f\u0440\u0438 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435",
"unknown": "\u041d\u0435\u043e\u0447\u0430\u043a\u0432\u0430\u043d\u0430 \u0433\u0440\u0435\u0448\u043a\u0430"
},
"flow_title": "{name} ({model} at {host})",

View File

@@ -231,7 +231,10 @@ SENSOR_DESCRIPTIONS = {
state_class=SensorStateClass.MEASUREMENT,
),
# UV index (-)
(BTHomeSensorDeviceClass.UV_INDEX, None,): SensorEntityDescription(
(
BTHomeSensorDeviceClass.UV_INDEX,
None,
): SensorEntityDescription(
key=f"{BTHomeSensorDeviceClass.UV_INDEX}",
state_class=SensorStateClass.MEASUREMENT,
),
@@ -256,7 +259,10 @@ SENSOR_DESCRIPTIONS = {
state_class=SensorStateClass.MEASUREMENT,
),
# Volume (L)
(BTHomeSensorDeviceClass.VOLUME, Units.VOLUME_LITERS,): SensorEntityDescription(
(
BTHomeSensorDeviceClass.VOLUME,
Units.VOLUME_LITERS,
): SensorEntityDescription(
key=f"{BTHomeSensorDeviceClass.VOLUME}_{Units.VOLUME_LITERS}",
device_class=SensorDeviceClass.VOLUME,
native_unit_of_measurement=UnitOfVolume.LITERS,

View File

@@ -735,7 +735,6 @@ class BrSensor(SensorEntity):
or sensor_type.endswith("_4d")
or sensor_type.endswith("_5d")
):
# update forecasting sensors:
fcday = 0
if sensor_type.endswith("_2d"):

View File

@@ -5,7 +5,7 @@
"unknown": "\u041d\u0435\u043e\u0447\u0430\u043a\u0432\u0430\u043d\u0430 \u0433\u0440\u0435\u0448\u043a\u0430"
},
"error": {
"cannot_connect": "\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435"
"cannot_connect": "\u041d\u0435\u0443\u0441\u043f\u0435\u0445 \u043f\u0440\u0438 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435"
},
"flow_title": "{name}",
"step": {

View File

@@ -21,11 +21,10 @@ def get_cert(
"""Get the certificate for the host and port combination."""
ctx = ssl.create_default_context()
address = (host, port)
with socket.create_connection(address, timeout=TIMEOUT) as sock, ctx.wrap_socket(
sock, server_hostname=address[0]
) as ssock:
cert = ssock.getpeercert()
return cert
with socket.create_connection(address, timeout=TIMEOUT) as sock:
with ctx.wrap_socket(sock, server_hostname=address[0]) as ssock:
cert = ssock.getpeercert()
return cert
async def get_cert_expiry_timestamp(

View File

@@ -1,23 +1,15 @@
"""Unify Circuit platform for notify component."""
from __future__ import annotations
import logging
from circuit_webhook import Circuit
from homeassistant.components.notify import BaseNotificationService
from homeassistant.const import CONF_URL
from homeassistant.core import HomeAssistant
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
_LOGGER = logging.getLogger(__name__)
def get_service(
hass: HomeAssistant,
config: ConfigType,
discovery_info: DiscoveryInfoType | None = None,
) -> CircuitNotificationService | None:
def get_service(hass, config, discovery_info=None):
"""Get the Unify Circuit notification service."""
if discovery_info is None:
return None

View File

@@ -1,6 +1,4 @@
"""Cisco Webex Teams notify component."""
from __future__ import annotations
import logging
import voluptuous as vol
@@ -12,9 +10,7 @@ from homeassistant.components.notify import (
BaseNotificationService,
)
from homeassistant.const import CONF_TOKEN
from homeassistant.core import HomeAssistant
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
_LOGGER = logging.getLogger(__name__)
@@ -25,11 +21,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
)
def get_service(
hass: HomeAssistant,
config: ConfigType,
discovery_info: DiscoveryInfoType | None = None,
) -> CiscoWebexTeamsNotificationService | None:
def get_service(hass, config, discovery_info=None):
"""Get the CiscoWebexTeams notification service."""
client = WebexTeamsAPI(access_token=config[CONF_TOKEN])

View File

@@ -1,6 +1,4 @@
"""clicksend_tts platform for notify component."""
from __future__ import annotations
from http import HTTPStatus
import json
import logging
@@ -16,9 +14,7 @@ from homeassistant.const import (
CONF_USERNAME,
CONTENT_TYPE_JSON,
)
from homeassistant.core import HomeAssistant
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
_LOGGER = logging.getLogger(__name__)
@@ -53,11 +49,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
)
def get_service(
hass: HomeAssistant,
config: ConfigType,
discovery_info: DiscoveryInfoType | None = None,
) -> ClicksendNotificationService | None:
def get_service(hass, config, discovery_info=None):
"""Get the ClickSend notification service."""
if not _authenticate(config):
_LOGGER.error("You are not authorized to access ClickSend")

View File

@@ -1,128 +1,44 @@
{
"device_automation": {
"action_type": {
"set_hvac_mode": "D\u00e9finir le mode CVC de {entity_name}",
"set_hvac_mode": "Changer le mode HVAC sur {entity_name}.",
"set_preset_mode": "Changer les pr\u00e9r\u00e9glages de {entity_name}"
},
"condition_type": {
"is_hvac_mode": "{entity_name} est r\u00e9gl\u00e9 sur un mode CVC sp\u00e9cifique",
"is_hvac_mode": "{entity_name} est d\u00e9fini sur un mode HVAC sp\u00e9cifique",
"is_preset_mode": "{entity_name} est d\u00e9fini sur un mode pr\u00e9d\u00e9fini sp\u00e9cifique"
},
"trigger_type": {
"current_humidity_changed": "Changement d'humidit\u00e9 mesur\u00e9e pour {entity_name}",
"current_temperature_changed": "Changement de temp\u00e9rature mesur\u00e9e pour {entity_name}",
"hvac_mode_changed": "Modification du mode CVC de {entity_name}"
"hvac_mode_changed": "Mode HVAC chang\u00e9 pour {entity_name}"
}
},
"state": {
"_": {
"auto": "Auto",
"cool": "Rafra\u00eechissement",
"dry": "Ass\u00e9chage",
"fan_only": "Ventilation uniquement",
"heat": "Chauffage",
"heat_cool": "Chauffage / Rafra\u00eechissement",
"cool": "Frais",
"dry": "Sec",
"fan_only": "Ventilateur seul",
"heat": "Chauffe",
"heat_cool": "Chaud/Froid",
"off": "D\u00e9sactiv\u00e9"
}
},
"state_attributes": {
"_": {
"aux_heat": {
"name": "Chauffage auxiliaire"
},
"current_humidity": {
"name": "Humidit\u00e9 actuelle"
},
"current_temperature": {
"name": "Temp\u00e9rature actuelle"
},
"fan_mode": {
"name": "Mode de ventilation",
"state": {
"auto": "Auto",
"diffuse": "Diffuse",
"focus": "Focalis\u00e9e",
"high": "\u00c9lev\u00e9e",
"low": "Faible",
"medium": "Moyenne",
"middle": "Milieu",
"off": "D\u00e9sactiv\u00e9e",
"on": "Activ\u00e9e",
"top": "Haute"
}
},
"fan_modes": {
"name": "Modes de ventilation"
},
"humidity": {
"name": "Humidit\u00e9 cible"
},
"hvac_action": {
"name": "Action actuelle",
"state": {
"cooling": "Rafra\u00eechissement",
"drying": "Ass\u00e9chage",
"fan": "Ventilation",
"heating": "Chauffe",
"idle": "Inactif",
"off": "Arr\u00eat"
}
},
"hvac_modes": {
"name": "Modes CVC"
},
"max_humidity": {
"name": "Humidit\u00e9 cible maximale"
},
"max_temp": {
"name": "Temp\u00e9rature cible maximale"
},
"min_humidity": {
"name": "Humidit\u00e9 cible minimale"
},
"min_temp": {
"name": "Temp\u00e9rature cible minimale"
},
"preset_mode": {
"name": "Pr\u00e9r\u00e9glage",
"state": {
"activity": "Activit\u00e9",
"away": "Absent",
"boost": "Boost",
"comfort": "Confort",
"eco": "\u00c9co",
"home": "\u00c0 la maison",
"none": "Aucun",
"sleep": "Nuit"
"comfort": "Confort"
}
},
"preset_modes": {
"name": "Pr\u00e9r\u00e9glages"
},
"swing_mode": {
"name": "Mode d\u2019oscillation",
"state": {
"both": "Les deux",
"horizontal": "Horizontale",
"off": "D\u00e9sactiv\u00e9e",
"on": "Activ\u00e9e",
"vertical": "Verticale"
}
},
"swing_modes": {
"name": "Modes d\u2019oscillation"
},
"target_temp_high": {
"name": "Temp\u00e9rature cible sup\u00e9rieure"
},
"target_temp_low": {
"name": "Temp\u00e9rature cible inf\u00e9rieure"
},
"target_temp_step": {
"name": "Pas de temp\u00e9rature cible"
},
"temperature": {
"name": "Temp\u00e9rature cible"
}
}
},

View File

@@ -40,8 +40,8 @@
"name": "\u98ce\u901f",
"state": {
"auto": "\u81ea\u52a8",
"high": "\u5f3a",
"low": "\u5f31",
"high": "\u9ad8",
"low": "\u4f4e",
"medium": "\u4e2d",
"middle": "\u4e2d\u95f4",
"off": "\u5173",

View File

@@ -38,7 +38,7 @@ async def async_provide_implementation(hass: HomeAssistant, domain: str):
for service in services:
if (
service["service"] == domain
and service["min_version"] <= CURRENT_PLAIN_VERSION
and CURRENT_PLAIN_VERSION >= service["min_version"]
and (
service.get("accepts_new_authorizations", True)
or (

View File

@@ -96,7 +96,6 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
"""Handle the initial step."""
errors = {}
if user_input is not None:
hub = Control4Validator(
user_input[CONF_HOST],
user_input[CONF_USERNAME],

View File

@@ -5,7 +5,7 @@
},
"error": {
"cannot_connect": "\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435",
"invalid_auth": "\u041d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u0430 \u0430\u0432\u0442\u0435\u043d\u0442\u0438\u043a\u0430\u0446\u0438\u044f",
"invalid_auth": "\u041d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u043e \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u044f\u0432\u0430\u043d\u0435",
"unknown": "\u041d\u0435\u043e\u0447\u0430\u043a\u0432\u0430\u043d\u0430 \u0433\u0440\u0435\u0448\u043a\u0430"
},
"step": {

View File

@@ -403,16 +403,20 @@ class DefaultAgent(AbstractConversationAgent):
entity = entities.async_get(state.entity_id)
if entity is not None:
if entity.entity_category:
# Skip configuration/diagnostic entities
if entity.entity_category or entity.hidden:
# Skip configuration/diagnostic/hidden entities
continue
if entity.aliases:
for alias in entity.aliases:
names.append((alias, state.entity_id, context))
# Default name
names.append((state.name, state.entity_id, context))
# Default name
names.append((state.name, state.entity_id, context))
else:
# Default name
names.append((state.name, state.entity_id, context))
self._names_list = TextSlotList.from_tuples(names, allow_template=False)
return self._names_list

View File

@@ -2,9 +2,9 @@
"domain": "conversation",
"name": "Conversation",
"documentation": "https://www.home-assistant.io/integrations/conversation",
"requirements": ["hassil==0.2.6", "home-assistant-intents==2023.1.25"],
"requirements": ["hassil==0.2.6", "home-assistant-intents==2023.1.31"],
"dependencies": ["http"],
"codeowners": ["@home-assistant/core", "@synesthesiam"],
"codeowners": ["@home-assistant/core"],
"quality_scale": "internal",
"iot_class": "local_push",
"integration_type": "system"

View File

@@ -2,7 +2,7 @@
"config": {
"error": {
"cannot_connect": "\u00c9chec de connexion",
"no_units": "Aucune unit\u00e9 CVC n\u2019a \u00e9t\u00e9 trouv\u00e9e dans l\u2019h\u00f4te CoolMasterNet."
"no_units": "Impossible de trouver des unit\u00e9s HVAC dans l'h\u00f4te CoolMasterNet."
},
"step": {
"user": {

View File

@@ -2,7 +2,7 @@
"config": {
"abort": {
"already_configured": "\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u0442\u043e \u0432\u0435\u0447\u0435 \u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0430\u043d\u043e",
"cannot_connect": "\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435"
"cannot_connect": "\u041d\u0435\u0443\u0441\u043f\u0435\u0445 \u043f\u0440\u0438 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435"
},
"error": {
"api_password": "\u041d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u043e \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u044f\u0432\u0430\u043d\u0435, \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 API \u043a\u043b\u044e\u0447 \u0438\u043b\u0438 \u043f\u0430\u0440\u043e\u043b\u0430.",

View File

@@ -188,6 +188,7 @@ class DarkSkyWeather(WeatherEntity):
@property
def forecast(self):
"""Return the forecast array."""
# Per conversation with Joshua Reyes of Dark Sky, to get the total
# forecasted precipitation, you have to multiple the intensity by
# the hours for the forecast interval

View File

@@ -271,7 +271,6 @@ class DeconzBinarySensor(DeconzDevice[SensorResources], BinarySensorEntity):
attr[ATTR_TEMPERATURE] = self._device.internal_temperature
if isinstance(self._device, Presence):
if self._device.dark is not None:
attr[ATTR_DARK] = self._device.dark

View File

@@ -87,8 +87,7 @@ class DeconzFlowHandler(ConfigFlow, domain=DOMAIN):
If no bridge is found allow user to manually input configuration.
"""
if user_input is not None:
if user_input[CONF_HOST] == CONF_MANUAL_INPUT:
if CONF_MANUAL_INPUT == user_input[CONF_HOST]:
return await self.async_step_manual_input()
for bridge in self.bridges:

View File

@@ -372,7 +372,6 @@ class DeconzSensor(DeconzDevice[SensorResources], SensorEntity):
attr[ATTR_DAYLIGHT] = self._device.daylight
elif isinstance(self._device, LightLevel):
if self._device.dark is not None:
attr[ATTR_DARK] = self._device.dark

View File

@@ -186,10 +186,8 @@ async def async_remove_orphaned_entries_service(gateway: DeconzGateway) -> None:
devices_to_be_removed.remove(event.device_id)
for entry in entity_entries:
# Don't remove available entities
if entry.unique_id in gateway.entities[entry.domain]:
# Don't remove devices with available entities
if entry.device_id in devices_to_be_removed:
devices_to_be_removed.remove(entry.device_id)

View File

@@ -10,7 +10,7 @@
"linking_not_possible": "\u041d\u0435 \u043c\u043e\u0436\u0430 \u0434\u0430 \u0441\u0435 \u0441\u0432\u044a\u0440\u0436\u0435 \u0441 \u0448\u043b\u044e\u0437\u0430",
"no_key": "\u041d\u0435 \u043c\u043e\u0436\u0430 \u0434\u0430 \u0441\u0435 \u043f\u043e\u043b\u0443\u0447\u0438 API \u043a\u043b\u044e\u0447"
},
"flow_title": "{host}",
"flow_title": "deCONZ Zigbee \u0448\u043b\u044e\u0437 ({host})",
"step": {
"hassio_confirm": {
"description": "\u0418\u0441\u043a\u0430\u0442\u0435 \u043b\u0438 \u0434\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0430\u0442\u0435 Home Assistant \u0434\u0430 \u0441\u0435 \u0441\u0432\u044a\u0440\u0437\u0432\u0430 \u0441 deCONZ \u0431\u0430\u0437\u043e\u0432\u0430 \u0441\u0442\u0430\u043d\u0446\u0438\u044f, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0435\u043d \u043e\u0442 \u0434\u043e\u0431\u0430\u0432\u043a\u0430\u0442\u0430 \u0437\u0430 Supervisor {addon}?",

View File

@@ -65,8 +65,8 @@
"trigger_type": {
"remote_awakened": "A k\u00e9sz\u00fcl\u00e9k fel\u00e9bredt",
"remote_button_double_press": "\"{subtype}\" gombra k\u00e9tszer kattintottak",
"remote_button_long_press": "\"{subtype}\" gomb folyamatosan lenyomva",
"remote_button_long_release": "\"{subtype}\" gomb hossz\u00fa megnyom\u00e1s ut\u00e1n elengedve",
"remote_button_long_press": "A \"{subtype}\" gomb folyamatosan lenyomva",
"remote_button_long_release": "A \"{subtype}\" gomb hossz\u00fa megnyom\u00e1s ut\u00e1n elengedve",
"remote_button_quadruple_press": "\"{subtype}\" gombra n\u00e9gyszer kattintottak",
"remote_button_quintuple_press": "\"{subtype}\" gombra \u00f6tsz\u00f6r kattintottak",
"remote_button_rotated": "A gomb elforgatva: \"{subtype}\"",

View File

@@ -121,6 +121,6 @@ class DeLijnPublicTransportSensor(SensorEntity):
self._attr_extra_state_attributes["next_passages"] = self.line.passages
self._attr_available = True
except (KeyError) as error:
except KeyError as error:
_LOGGER.error("Invalid data received from De Lijn: %s", error)
self._attr_available = False

View File

@@ -99,6 +99,6 @@ class DelugeFlowHandler(ConfigFlow, domain=DOMAIN):
return "cannot_connect"
except Exception as ex: # pylint:disable=broad-except
if type(ex).__name__ == "BadLoginError":
return "invalid_auth"
return "invalid_auth" # pragma: no cover
return "unknown"
return None

View File

@@ -1,28 +1,5 @@
{
"entity": {
"climate": {
"ubercool": {
"state_attributes": {
"fan_mode": {
"state": {
"auto_high": "Auto \u00e9lev\u00e9e",
"auto_low": "Auto faible",
"on_high": "Sur \u00e9lev\u00e9e",
"on_low": "Sur faible"
}
},
"swing_mode": {
"state": {
"1": "1",
"2": "2",
"3": "3",
"auto": "Auto",
"off": "D\u00e9sactiv\u00e9e"
}
}
}
}
},
"sensor": {
"thermostat_mode": {
"state": {

View File

@@ -245,7 +245,7 @@ class DerivativeSensor(RestoreEntity, SensorEntity):
derivative = new_derivative
else:
derivative = Decimal(0)
for (start, end, value) in self._state_list:
for start, end, value in self._state_list:
weight = calculate_weight(start, end, new_state.last_updated)
derivative = derivative + (value * Decimal(weight))

View File

@@ -39,14 +39,5 @@
}
}
},
"selector": {
"time_unit": {
"options": {
"h": "\u038f\u03c1\u03b5\u03c2",
"min": "\u039b\u03b5\u03c0\u03c4\u03ac",
"s": "\u0394\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03b1"
}
}
},
"title": "\u0391\u03b9\u03c3\u03b8\u03b7\u03c4\u03ae\u03c1\u03b1\u03c2 \u03c0\u03b1\u03c1\u03b1\u03b3\u03ce\u03b3\u03c9\u03bd"
}

View File

@@ -39,15 +39,5 @@
}
}
},
"selector": {
"time_unit": {
"options": {
"d": "D\u00edas",
"h": "Horas",
"min": "Minutos",
"s": "Segundos"
}
}
},
"title": "Sensor de derivaci\u00f3n"
}

View File

@@ -39,15 +39,5 @@
}
}
},
"selector": {
"time_unit": {
"options": {
"d": "Nap",
"h": "\u00d3ra",
"min": "Perc",
"s": "M\u00e1sodperc"
}
}
},
"title": "Sz\u00e1rmaz\u00e9kos \u00e9rz\u00e9kel\u0151"
}

View File

@@ -39,15 +39,5 @@
}
}
},
"selector": {
"time_unit": {
"options": {
"d": "Hari",
"h": "Jam",
"min": "Menit",
"s": "Detik"
}
}
},
"title": "Sensor Turunan"
}

View File

@@ -39,15 +39,5 @@
}
}
},
"selector": {
"time_unit": {
"options": {
"d": "Dagen",
"h": "Uren",
"min": "Minuten",
"s": "Seconden"
}
}
},
"title": "Afgeleide"
}

View File

@@ -39,15 +39,5 @@
}
}
},
"selector": {
"time_unit": {
"options": {
"d": "Dager",
"h": "Timer",
"min": "Minutter",
"s": "Sekunder"
}
}
},
"title": "Avledet sensor"
}

View File

@@ -39,15 +39,5 @@
}
}
},
"selector": {
"time_unit": {
"options": {
"d": "Dias",
"h": "Horas",
"min": "Minutos",
"s": "Segundos"
}
}
},
"title": "Sensor derivativo"
}

View File

@@ -39,15 +39,5 @@
}
}
},
"selector": {
"time_unit": {
"options": {
"d": "Dni",
"h": "Hodiny",
"min": "Min\u00faty",
"s": "Sekundy"
}
}
},
"title": "Deriva\u010dn\u00fd sn\u00edma\u010d"
}

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