Commit Graph

484 Commits (aa05f7321066250e82df498fbea1464f5a4536d5)

Author SHA1 Message Date
Erik Montnemery 04a5a1d18b
Improve demo config flow and add tests (#118481)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-06-09 16:02:58 +02:00
G Johansson 6b7ff2bf44
Add default code to alarm_control_panel (#112540) 2024-05-29 10:46:53 +02:00
G Johansson 7862596ef3
Add `open` state to LockEntity (#111968)
* Add `open` state to LockEntity

* Add tests

* Fixes

* Fix tests

* strings and icons

* Adjust demo open lock

* Fix lock and tests

* fix import

* Fix strings

* mute ruff

* Change sequence

* Sequence2

* Group on states

* Fix ruff

* Fix tests

* Add more test cases

* Sorting
2024-05-08 20:42:22 +02:00
Jan Bouwhuis 84308c9e53
Add title feature to notify entity platform (#116426)
* Add title feature to notify entity platform

* Add overload variants

* Remove overloads, update signatures

* Improve test coverage

* Apply suggestions from code review

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

* Do not use const

* fix typo

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-05-03 11:17:28 +02:00
Jan Bouwhuis 36bdda5669
Migrate demo notify platform (#115448)
* Migrate demo notify platform

* Update homeassistant/components/demo/notify.py

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

* Remove no needed tests

* Cleanup redundant attribute assignment

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-04-13 14:27:07 +02:00
Sid 9cbed10372
Enable Ruff PYI041 (#115229) 2024-04-08 09:29:05 -10:00
Marc Mueller 44eeb2eb5e
Allow Humidifier.current_humidity to be a float (#111297)
* Allow Humidifier.current_humidity to be a float

* Code review

* Allow climate humidity values to be float

* Update demo integration
2024-03-27 11:19:20 +01:00
Erik Montnemery 25fe74aec5
Remove AUX heating from demo climate (#113929) 2024-03-21 11:35:27 +01:00
Sid d5fd005db8
Add ruff rule PIE808 (#113621) 2024-03-17 09:56:26 +01:00
Sid ccd2e989c3
Enable ruff RUF005 and fix occurrences (#113589) 2024-03-16 07:37:20 -10:00
Joost Lekkerkerker 0316681615
Add service icons to Demo (#113414) 2024-03-14 16:49:17 +01:00
Marc Mueller aa16a9d707
Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +01:00
Marc Mueller 0e3945ca6c
Add empty line after module docstring [d-f] (#112698) 2024-03-08 14:15:26 +01:00
Erik Montnemery 6fe28d3764
Migrate integrations a-d to generic flowhandler (#111861) 2024-02-29 20:07:14 +01:00
Tucker Kern 3abc48b7c1
Add icons for fan preset modes (#109334)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-02-04 23:58:44 +01:00
G Johansson 28337fb941
Add new climate feature flags to demo (#109481) 2024-02-03 11:07:56 +01:00
Paul Bottein 02ac985120
Use right initial attribute value for demo climate (#108719) 2024-01-29 21:46:04 +01:00
Franck Nijhof 01372024f5
Add icon translations support (#103294)
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2024-01-19 16:56:56 +01:00
Jan Bouwhuis 3ff74fe20f
Refactor demo vacuum's to only use StateVacuum base class and features (#108150)
* Demo cleanup

* Refactor vacuum demo to only use state vacuum base class

* Remove unneeded feature checks

* Remove exclusion issue for mqtt an demo
2024-01-16 16:44:12 +01:00
G Johansson 83f4d3af5c
Implement mode validation in Climate entity component (#105745)
* Implement mode validation in Climate entity component

* Fix some tests

* more tests

* Fix translations

* fix deconz tests

* Fix switcher_kis tests

* not None

* Fix homematicip_cloud test

* Always validate

* Fix shelly

* reverse logic in validation

* modes_str

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-27 14:51:39 +01:00
J. Nick Koston f097e2a2f6
Add support for attribute caching to the media_player platform (#106257) 2023-12-23 13:33:11 -10:00
J. Nick Koston abd3c54cbe
Add support for attribute caching to the camera platform (#106256) 2023-12-23 13:01:47 -10:00
Jan Bouwhuis 953a212dd6
Use ServiceValidationError for invalid fan preset_mode and move check to fan entity component (#104560)
* Use ServiceValidationError for fan preset_mode

* Use _valid_preset_mode_or_raise to raise

* Move preset_mode validation to entity component

* Fix bond fan and comments

* Fixes baf, fjaraskupan and template

* More integration adjustments

* Add custom components mock and test code

* Make NotValidPresetModeError subclass

* Update homeassistant/components/fan/strings.json

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

* Keep bond has_action validation

* Move demo test asserts outside context block

* Follow up comment

* Update homeassistant/components/fan/strings.json

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

* Fix demo tests

* Remove pylint disable

* Remove unreachable code

* Update homeassistant/components/fan/__init__.py

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

* Use NotValidPresetModeError, Final methods

* Address comments

* Correct docst

* Follow up comments

* Update homeassistant/components/fan/__init__.py

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-11-29 13:56:51 +01:00
G Johansson 3c3f512583
Remove setup_platform for demo (#100867) 2023-10-15 23:12:41 +02:00
Tudor Sandu 43c1769004
Use walrus assignment i demo climate `climate.set_temperature` (#101248) 2023-10-06 21:32:06 +02:00
Tudor Sandu 542ab2dd76
Fix ignored argument in service call for demo climate (#101137)
Fix service call for demo climate
2023-09-29 23:06:41 -04:00
Allen Porter 8d9c5a61ec
Update calendar handle state updates at start/end of active/upcoming event (#98037)
* Update calendar handle state updates at start/end of active/upcoming event

* Use async_write_ha_state intercept state updates

Remove unrelated changes and whitespace.

* Revert unnecessary changes

* Move demo calendar to config entries to cleanup event timers

* Fix docs on calendars

* Move method inside from PR feedback
2023-08-25 18:32:20 -07:00
Ville Skyttä 3b4774d9ed
Remove unnnecessary pylint configs from components/[a-d]* (#98911) 2023-08-24 00:54:02 +02:00
Ville Skyttä 2399cd283a
Python 3.10 support cleanups (#98640) 2023-08-21 19:14:07 +02:00
Erik Montnemery 1897be1467
Map demo and kitchen_sink weather condition codes once (#98510)
Map demo and kitchen_sink condition codes once
2023-08-16 22:12:22 +02:00
Erik Montnemery 045c327928
Move DeviceInfo from entity to device registry (#98149)
* Move DeviceInfo from entity to device registry

* Update integrations
2023-08-10 22:04:26 -04:00
Jan Bouwhuis 714a04d603
Add service turn_on and turn_off service for water_heater (#94817) 2023-07-25 10:16:05 +02:00
Franck Nijhof f8c3aa7bec
Remove the use of StateType from Demo (#97111) 2023-07-23 18:20:23 -05:00
G Johansson 4e30056830
Add new Forecasting to Weather (#75219)
* Add new Forecasting to Weather

* Add is_daytime for forecast_twice_daily

* Fix test

* Fix demo test

* Adjust tests

* Fix typing

* Add demo

* Mod demo more realistic

* Fix test

* Remove one weather

* Fix weather example

* kitchen_sink

* Reverse demo partially

* mod kitchen sink

* Fix twice_daily

* kitchen_sink

* Add test weathers

* Add twice daily to demo

* dt_util

* Fix names

* Expose forecast via WS instead of as state attributes

* Regularly update demo + kitchen_sink weather forecasts

* Run linters

* Fix rebase mistake

* Improve demo test coverage

* Improve weather test coverage

* Exclude kitchen_sink weather from test coverage

* Rename async_update_forecast to async_update_listeners

* Add async_has_listeners helper

* Revert "Add async_has_listeners helper"

This reverts commit 52af3664bb06d9feac2c5ff963ee0022077c23ba.

* Fix rebase mistake

---------

Co-authored-by: Erik <erik@montnemery.com>
2023-07-21 17:30:48 +02:00
Franck Nijhof 747f4d4a73
Add event entity (#96797) 2023-07-21 12:16:35 +02:00
Franck Nijhof e9a63b7501
Use default icon for demo button entity (#96961) 2023-07-20 23:02:59 +02:00
J. Nick Koston 7a1f0a0b74
Remove unneeded str() in StrEnum backport (#96509) 2023-07-13 22:37:59 -10:00
Paulus Schoutsen 7859be6481
Add deduplicate translations script (#96384)
* Add deduplicate script

* Fix forecast_solar incorrect key with space

* Fix utf-8

* Do not create references to other arbitrary other integrations

* Add commented code to only allow applying to referencing integrations

* Tweak

* Bug fix

* Add command line arg for limit reference

* never suggest to update common keys

* Output of script

* Apply suggestions from code review

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

---------

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2023-07-13 11:52:50 -04:00
Franck Nijhof ea3be7a789
Migrate integration services (E-F) to support translations (#96367) 2023-07-11 23:57:29 +02:00
Joost Lekkerkerker a04aaf10a5
Use DeviceInfo object d-o (#96280) 2023-07-11 19:41:55 +02:00
Erik Montnemery 298ab05470
Add missing issue translations to the kitchen_sink integration (#95931) 2023-07-07 18:15:06 +02:00
Allen Porter 26f2fabd85
Fix timezones used in list events (#95804)
* Fix timezones used in list events

* Add additional tests that catch floating vs timezone datetime comparisons
2023-07-05 08:25:03 +02:00
Jan Bouwhuis c26dc0940c
Use common translations for `On`, `Off`, `Open` and `Closed` (#95779)
* Use common translations for On and Off

* Used common translations for open and closed

* Update homeassistant/components/sensibo/strings.json

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

* Only update state translations

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-07-04 13:52:01 +02:00
Paul Bottein 4581c36648
Fix datetime parameter validation for list events (#95778) 2023-07-03 15:22:22 -04:00
Jan Bouwhuis 0a74bffe67
Fix error for stt when async_get_engine is not implemented (#95443)
* Fix error for stt

* Revert "Fix error for stt"

This reverts commit 723cd191fe.

* Remove legacy stt platform component
2023-06-28 15:27:06 +02:00
Denis Shulyaka ae21ab2945
Add `action` attribute to Humidifier entity (#95131)
* Add HumidifierAction StrEnum

* Add action attribute to HumidifierEntity

* Update strings.json

* Add action to demo humidifier

* Add tests

* Fix imports

* Add 'off' humidifier action

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

* Add 'off' action to strings.json

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

* Use is_on instead of state

* Fix typo

* black
2023-06-28 13:21:17 +02:00
Allen Porter b9b5fe6be8
Add service response data for listing calendar events (#94759)
* Add service response data for listing calendar events

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

* Rename input arguments and add service description

* Improve list events to be more user friendly

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

* Wrap docstrings properly.

* Increase test coverage

* Update to use new API calls

* Readability improvements

* Wrap docstrings

* Require at least one of end or duration

* Check for multiple entity matches earlier in the request

* Update documentation strings
2023-06-23 23:34:34 -04:00
Marc Mueller 86792fcc2f
Update mypy to 1.4.0 (#94987) 2023-06-21 16:12:51 +02:00
Denis Shulyaka 185aaa9e07
Humidifier current humidity (#94874) 2023-06-20 09:43:33 +02:00
Erik Montnemery 43c4dec3ed
Explicitly opt-in to device name in the demo integration (#94647) 2023-06-19 15:56:48 +02:00