Commit graph

85 commits

Author SHA1 Message Date
Florian
9b2915efed
Don't allow switch toggle when device in locked in AVM FRITZ!SmartHome (#120132)
* fix: set state of the FritzBox-Switch to disabled if the option for manuel switching in the userinterface is disabled

* feat: raise an error instead of disabling switch

* feat: rename method signature

* fix: tests

* fix: wrong import

* feat: Update homeassistant/components/fritzbox/strings.json

Update error message

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>

* Update tests/components/fritzbox/test_switch.py

feat: update test

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>

* make ruff happy

* fix expected error message check

---------

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2024-06-26 21:45:17 +02:00
Michael
1a962b415e
Add support to consider device holiday and summer mode in AVM Fritz!Smarthome (#119862) 2024-06-22 12:40:03 +02:00
Michael
c5cac8fed4
Store runtime data inside the config entry in AVM Fritz!Smarthome (#116523) 2024-05-01 20:51:39 +02:00
epenet
ad84ff18eb
Use remove_device helper in tests (1/2) (#116240)
* Use remove_device helper in tests

* Update test_tag.py

* Update test_tag.py
2024-04-30 12:52:33 +02:00
Michael
9fcb774252
Add reconfigure flow to AVM Fritz!SmartHome (#116047) 2024-04-24 13:06:14 +02:00
Michael
354c20a57b
Automatic cleanup of entity and device registry in AVM FRITZ!SmartHome (#114601) 2024-04-20 12:13:56 +02:00
Sid
3efee10b95
Enable Ruff RUF013 (#115333) 2024-04-10 08:55:59 +02:00
Joost Lekkerkerker
906d3198e3
Use is in enum comparison in config flow tests F-J (#114670)
* Use right enum expression F-J

* Fix
2024-04-02 23:01:37 +02:00
jayme-github
850dac0655
Don't overwrite target temperature by setting hvac mode in AVM Fritz!SmartHome (#112119) 2024-04-02 20:14:02 +02:00
J. Nick Koston
9a79320861
Mark executor jobs as background unless created from a tracked task (#114450)
* Mark executor jobs as background unless created from a tracked task

If the current task is not tracked the executor job should not
be a background task to avoid delaying startup and shutdown.

Currently any executor job created in a untracked task or
background task would end up being tracked and delaying
startup/shutdown

* import exec has the same issue

* Avoid tracking import executor jobs

There is no reason to track these jobs as they are always awaited
and we do not want to support fire and forget import executor jobs

* fix xiaomi_miio

* lots of fire time changed without background await

* revert changes moved to other PR

* more

* more

* more

* m

* m

* p

* fix fire and forget tests

* scrape

* sonos

* system

* more

* capture callback before block

* coverage

* more

* more races

* more races

* more

* missed some

* more fixes

* missed some more

* fix

* remove unneeded

* one more race

* two
2024-03-30 00:16:53 -04:00
Joost Lekkerkerker
6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Marc Mueller
aa16a9d707
Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +01:00
Marc Mueller
32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller
c88b337600
Add empty line after module docstring [tests f-k] (#112709) 2024-03-08 14:50:04 +01:00
Jan Bouwhuis
861bb48ab6
Assign specific error code for HomeAssistantError on websocket_api connection exceptions (#104700)
Assign specific error code for HomeAssistantError
2023-11-29 13:07:52 +01:00
Michael
9c5e0fc2c9
Discover new added device at runtime in AVM Fritz!Smarthome (#103859) 2023-11-20 17:13:52 +01:00
Jan-Philipp Benecke
04a497343d
Update f-g* tests to use entity & device registry fixtures (#103841) 2023-11-12 13:07:38 +01:00
Paul Bottein
c98c18f25e
Return 'None' for light attributes when off instead of removing them (#101946) 2023-10-19 01:08:08 +02:00
Michael
18fad569e0
Add support to remove orphan devices in AVM FRITZ!SmartHome (#100739) 2023-09-26 18:01:01 +02:00
Michael
e7462e916a
Conditional category for temperature sensor entities in AVM Fritz!Smarthome (#98981) 2023-08-30 10:29:35 +02:00
Michael
533a8beac2
Raise ConfigEntryNotReady when unable to connect during setup of AVM Fritz!Smarthome (#97985) 2023-08-14 10:42:20 +02:00
Paulus Schoutsen
eee8566694
Differentiate between device info types (#95641)
* Differentiate between device info types

* Update allowed fields

* Update homeassistant/helpers/entity_platform.py

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

* Split up message in 2 lines

* Use dict for device info types

* Extract device info function and test error checking

* Simplify parsing device info

* move checks around

* Simplify more

* Move error checking around

* Fix order

* fallback config entry title to domain

* Remove fallback for name to config entry domain

* Ensure mocked configuration URLs are strings

* one more test case

* Apply suggestions from code review

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-07-10 09:56:06 -04:00
Allen Porter
12129e9d21
Update service call return values and error handling (#94657)
* Update return signature of service calls

* Add timeout error handling in websocket api for service calls

* Update recorder tests to remove assertion on service call

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

* Fix tests

* Add missing else

* await coro directly

* Fix more tests

* Update the intent task to use wait instead of timeout

* Remove script service call limits and limit constants

* Update tests that depend on service call limits

* Use wait instead of wait_for and add test

* Update homeassistant/helpers/intent.py

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

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-16 07:01:40 -07:00
Michael
9d508ac7ae
Add entity name translations to AVM Fritz!SmartHome (#90707)
* add entity name translation

* sort and capitalize

* adjust tests

* sort entities
2023-04-03 13:04:09 -04:00
Michael
d4cc4a343d
Use has_template property from lib in Fritz!SmartHome (#89152) 2023-03-21 21:33:33 +01:00
Michael
d4edec2863
Move calculation of current value into lib in Fritz!SmartHome (#89150) 2023-03-15 18:59:03 +01:00
parliament119
7d97653895
Bump pyfritzhome to 0.6.8 and add support for Non-Color-Bulbs (#89141) 2023-03-08 18:24:37 +01:00
Franck Nijhof
ed79265843
Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet
b68f502769
Add type hints to integration tests (part 7) (#87980) 2023-02-13 09:53:09 +01:00
epenet
a79be493e5
Adjust hass_client type hint in integration tests (#86954)
* Adjust hass_client type hint in integration tests

* Adjust hass_client_no_auth

* Fix rebase
2023-02-02 16:29:57 -05:00
epenet
6859a9ebdd
Add missing mock in fritzbox (#86005) 2023-01-16 13:05:22 +01:00
Michael
e5f67c9119
Replace the usage of unit constants by enumerations in Tests [f-g] (#85933) 2023-01-15 14:46:45 +01:00
Michael
ea95f74d6d
Fix loading of Fritz!Smarthome issues on older Fritz!Box (#83688)
* check if templates are available

* add test
2022-12-09 20:54:22 -05:00
Ayk Borstelmann
3b783a85c3
AVM Fritz!Box SmartHome: Integrate Templates (#81885) 2022-11-18 17:37:56 +01:00
Lars
1c8156bd33
Update Fritz! lights to use kelvin (#79733) 2022-10-25 13:45:02 +02:00
Michael
69bf77be12
Avoid multiline lambdas in Fritz!Smarthome sensors (#78524)
* avoid multiline lambdas

* update tests
2022-09-28 08:43:31 +02:00
epenet
0d696b84b2
Cleanup root component imports in tests (#78893) 2022-09-21 06:57:41 -10:00
Michael
6f02f7c6ce
Bump pyfritzhome to 0.6.7 (#78324) 2022-09-15 16:01:55 +02:00
jonasrickert
3e1c9f1ac7
Add Rollotron DECT 1213 to fritzbox (#76386) 2022-08-16 11:49:31 +02:00
Franck Nijhof
a6244eea28
Search/replace RESULT_TYPE_* by FlowResultType enum (#74656) 2022-07-07 21:28:18 +02:00
Michael
e30478457b
Fix voltage and current values for Fritz!DECT smart plugs (#73608)
fix voltage and current values
2022-06-17 07:40:02 +02:00
Lars
804c888098
Free color selection for Fritz!Smarthome lights (#66213)
* Fritz light free color selection

* Use setcolor as fallback

* better debug log message

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>

* change if-clause

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2022-05-25 09:28:36 +02:00
epenet
d52234a57a
Use climate enums in fritzbox (#70650)
* Use climate enums in fritzbox

* Adjust tests

* Update homeassistant/components/fritzbox/climate.py

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

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-04-25 13:33:51 +02:00
Michael
95421b1ae7
Ignore IPv6 link local address on ssdp discovery in Fritz!Smarthome (#69455) 2022-04-06 15:45:46 -07:00
Michael
6874b49a39
Perform re-login after Fritzbox has rebooted (#64709) 2022-01-24 12:25:29 +01:00
Michael
e0e6853968
Add diagnostics platform to AVM Fritz!Smarthome (#64657)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-01-21 11:25:19 -08:00
Josh Soref
c99ddcb80a
spelling: components/fritzbox (#64258)
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2022-01-17 15:31:48 +01:00
Michael
9deebaa65f
Move lock and devicelock attributes into sensors for all AVM Fritz!Smarthome entities (#60426) 2022-01-07 14:46:17 +01:00
Dave T
33bddf275c
Use SensorStateClass Enums in fritzbox tests (#62134) 2021-12-21 19:17:23 +01:00
Michael
8626de24fc
Use correct value for current temperature for AVM Fritz!Smarthome thermostat devices (#60510) 2021-11-29 19:58:22 +01:00