Commit Graph

465 Commits (0257cd8bbed5ddc33d3f795ac70b580c8d70684e)

Author SHA1 Message Date
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
Erik Montnemery f68ed8b7a0
Always setup demo platforms with device support from config entry (#94601)
* Always setup demo platforms with device support from config entry

* Update tests depending on the demo integration
2023-06-14 21:03:07 +02:00
Erik Montnemery 9a3077d64a
Always setup demo platforms with device support from config entry (#94586)
* Always setup demo platforms with device support from config entry

* Adjust test fixutres

* Update tests depending on the demo integration
2023-06-14 16:50:35 +02:00
Erik Montnemery 1b8c72e644
Remove legacy STT provider from the demo integration (#94585) 2023-06-14 14:55:50 +02:00
c0ffeeca7 c3a3ddcfa4
Standardize spelling of TTS and STT (#93857)
* Standardize spelling of TTS and STT

* Apply suggestions from code review

* Update homeassistant/components/tts/media_source.py

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-05-31 11:00:19 -04:00
Raman Gupta 24290e5d08
Add `datetime` platform (#81943)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-05-29 23:24:15 +02:00
Ville Skyttä ced67e5800
Import `util.dt` as `dt_util` in `components/[a-d]*` (#93756) 2023-05-30 00:02:06 +03:00
Erik Montnemery ef68f2c3ff
Add empty config schema to integrations d-h (#93645) 2023-05-29 21:00:08 +02:00
Erik Montnemery 30d9d7d905
Minor adjustment of tts typing (#93450) 2023-05-24 21:02:55 +02:00
epenet dc14b83249
Add ability to unload demo integration (#92515)
* Add unload to demo integration

* Adjust config tests to use kitchen_sink

* Use async_unload_platforms
2023-05-24 09:38:29 +02:00
epenet b6930c0f04
Fix lingering timer in demo geo_location (#92514) 2023-05-04 19:02:52 +02:00
Raman Gupta c0d0c89293
Add `time` platform (#81949) 2023-04-30 22:33:51 +02:00
Raman Gupta d138bbe26e
Add `date` platform (#81948) 2023-04-30 20:34:57 +02:00
Paulus Schoutsen a203149133
Allow entity names for STT entities (#91932)
* Allow entity names for STT entities

* Fix tests
2023-04-23 23:06:34 -04:00
Martin Hjelmare 473cbf7f9b
Add stt entity (#91230)
* Add stt entity

* Update demo platform

* Rename ProviderEntity to SpeechToTextEntity

* Fix get method

* Run all init tests for config entry setup

* Fix and test metadata from header

* Test config entry unload

* Rename get provider entity

* Test post for non existing provider

* Test entity name before addition

* Test restore state

* Use register shutdown

* Update deprecation comment
2023-04-13 13:58:35 -04:00
Michael Hansen 3e3ece4e56
Add speech to text over binary websocket to pipeline (#90082)
* Allow passing binary to the WS connection

* Expand test coverage

* Test non-existing handler

* Add text to speech and stages to pipeline

* Default to "cloud" TTS when engine is None

* Refactor pipeline request to split text/audio

* Refactor with PipelineRun

* Generate pipeline from language

* Clean up

* Restore TTS code

* Add audio pipeline test

* Clean TTS cache in test

* Clean up tests and pipeline base class

* Stop pylint and pytest magics from fighting

* Include mock_get_cache_files

* Working on STT

* Preparing to test

* First successful test

* Send handler_id

* Allow signaling end of stream using empty payloads

* Store handlers in a list

* Handle binary handlers raising exceptions

* Add stt/tts dependencies to voice_assistant

* Include STT audio in pipeline test

* Working on tests

* Refactoring with stages

* Fix tests

* Add more tests

* Add method docs

* Change stt demo/cloud to AsyncIterable

* Add pipeline error events

* Move handler id to separate message before pipeline

* Add test for invalid stage order

* Change "finish" to "end"

* Use enum

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-03-23 14:44:19 -04:00
Erik Montnemery cf7e500a8e
Support translating entity names (#88242) 2023-03-12 15:55:04 +01:00
epenet 4a3c0cd0a8
Adjust docstrings for ruff D404 (#89077) 2023-03-03 11:26:13 +01:00
Bram Kragten bee79e351e
Allow translation for data entry submit button (#88499) 2023-02-20 19:52:39 +01:00
Erik Montnemery 87420e949d
Sort manifests 2 (#87023) 2023-02-08 20:16:39 +01:00