Commit graph

693 commits

Author SHA1 Message Date
Miguel Camba
5175737b60
Add Valve integration ()
* Add Valve integration.

This adds the valve integration discussed in https://github.com/home-assistant/architecture/discussions/975
Most of the code is taken from the cover integration but simplified since valves
can't tilt.

There are a couple outstanding errors I'm not sure how to solve and prevents
me from even making this commit without `--no-verify`.

* Apply PR feedback

* Apply more feedback: Intruduce the bare minimum

* Remove file commited by mistake

* Hopefully this fixes tests

* Match cover's typing and mypy settings

* Change some configuration files

* Fix test

* Increase code coverage a little

* Code coverate inproved to 91%

* 95% code coverage

* Coverate up to 97%

* Coverage 98%

* Apply PR feedback

* Even more feedback

* Add line I shouldn't have removed

* Derive closed/open state from current position

* Hopefully last feedback

* Update homeassistant/components/valve/__init__.py

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

* Update homeassistant/components/valve/__init__.py

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

* Remove unnecesary translation

* Remove unused method arguments

* Complete code coverage

* Update homeassistant/components/valve/__init__.py

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

* Simplify tests

* Update homeassistant/components/valve/__init__.py

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

* Apply last feedback

* Update tests/components/valve/test_init.py

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

* Update tests/components/valve/test_init.py

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

* Update tests/testing_config/custom_components/test/valve.py

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

* More feedback

* Apply suggestion

* And more feedback

* Apply feedback

* Remove commented code

* Reverse logic to unindent

* Update homeassistant/components/valve/__init__.py

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

* Update homeassistant/components/valve/__init__.py

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

* Implement stop valve for Mock valve

* Fix tests now that I've implemented stop_valve

* Assert it's neither opening nor closing

* Use current position instead

* Avoid scheduling executor when opening or closing

* Fix incorrect bitwise operation

* Simplify toggle

* Remove uneeded partial functions

* Make is_last_toggle_direction_open private

* Remove valve from test custom integration

* Improve test coverage

* Address review comments

* Address review comments

* Address review comments

* Update homeassistant/components/valve/__init__.py

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

* Update tests

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik <erik@montnemery.com>
2023-12-18 19:48:00 +01:00
Joost Lekkerkerker
e4453ace88
Add country code constant () 2023-12-13 16:50:46 +01:00
Franck Nijhof
0a98a648bb
Bump version to 2024.1.0dev0 () 2023-11-29 21:29:11 +01:00
Franck Nijhof
f28c9221e6
Bump version to 2023.12.0dev0 () 2023-10-25 20:37:16 +02:00
Allen Porter
5d430f53cd
Add todo component () 2023-10-23 22:53:00 +02:00
Erik Montnemery
7a009ed6cd
Don't duplicate core services in hassio () 2023-10-23 20:26:56 +02:00
J. Nick Koston
93f10cdce8
Move event permissions out of the websocket api into auth () 2023-10-15 23:14:19 +02:00
Franck Nijhof
97f24b855f
Bump version to 2023.11.0dev0 () 2023-09-27 19:03:06 +02:00
Raman Gupta
067b94899f
Move EVENT_LOGGING_CHANGED to constants ()
* Move EVENT_LOGGING_CHANGED to constants

* fix test

* remove logger as dependency for bluetooth and fix test
2023-09-27 01:06:14 -04:00
Jan Rieger
ee65aa91e8
Allow setting the elevation in set_location ()
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-09-13 18:09:12 +02:00
Joost Lekkerkerker
59b1d4ba69
Bump version to 2023.10.0dev0 () 2023-08-30 19:32:10 +02:00
Michael Arthur
82b3ced4f1
Add lawnmower entity ()
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-08-21 12:19:55 +02:00
Michael Hansen
7ea2998b55
Add wake word integration ()
* Add wake component

* Add wake support to Wyoming

* Add helper function to assist_pipeline (not complete)

* Rename wake to wake_word

* Fix platform

* Use send_event and clean up

* Merge wake word into pipeline

* Add wake option to async_pipeline_from_audio_stream

* Add start/end stages to async_pipeline_from_audio_stream

* Add wake timeout

* Remove layer in wake_output

* Use VAD for wake word timeout

* Include audio metadata in wake-start

* Remove unnecessary websocket command

* wake -> wake_word

* Incorporate feedback

* Clean up wake_word tests

* Add wyoming wake word tests

* Add pipeline wake word test

* Add last processed state

* Fix tests

* Add tests for wake word

* More tests for the codebot
2023-08-07 22:22:16 -04:00
Franck Nijhof
9b7dcce7ed
Bump version to 2023.9.0dev0 () 2023-07-26 17:40:17 +02:00
Franck Nijhof
30058297cf
Migrate backported StrEnum to built-in StrEnum () 2023-07-23 23:19:24 +02:00
Franck Nijhof
ce1f5f997e
Drop Python 3.10 support () 2023-07-22 23:03:45 +02:00
Franck Nijhof
747f4d4a73
Add event entity () 2023-07-21 12:16:35 +02:00
J. Nick Koston
29aa89bea0
Add lightweight API to get core state () 2023-07-19 20:31:48 +02:00
Franck Nijhof
ec7beee4c1
Bump version to 2023.8.0dev0 () 2023-06-28 16:07:54 -04:00
Erik Montnemery
cb22fb16f8
Allow returning a script variable from a script ()
* Allow returning a script variable from a script

* Don't allow returning a template result

* Raise if response variable is undefined

* Add test

* Update homeassistant/helpers/script.py

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

* Format code

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-27 17:13:53 +02:00
Paulus Schoutsen
5f14cdf69d
Allow stopping a script with a response value () 2023-06-27 08:24:22 +02:00
Erik Montnemery
5303bef83e
Add image entity component () 2023-06-19 17:03:48 +02:00
Allen Porter
c4284c07b6
Allow scripts to capture service response data in variables ()
* Allow scripts service actions to save return values

* Simplify script service response data

* Rename result_variable to response_variable based on feedback
2023-06-16 22:59:44 -04:00
Franck Nijhof
8d8d0fc9d2
Bump version to 2023.7.0dev0 () 2023-05-31 20:34:30 +02:00
Franck Nijhof
8e05e3850b
Deprecate Python 3.10 () 2023-05-30 18:46:33 +02:00
Raman Gupta
24290e5d08
Add datetime platform ()
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-05-29 23:24:15 +02:00
Raman Gupta
c0d0c89293
Add time platform () 2023-04-30 22:33:51 +02:00
Raman Gupta
d138bbe26e
Add date platform () 2023-04-30 20:34:57 +02:00
Franck Nijhof
b5edf47454
Bump version to 2023.6.0dev0 () 2023-04-26 22:58:26 +02:00
Franck Nijhof
7010447b04
Bump version to 2023.5.0dev0 () 2023-03-29 16:46:32 -04:00
Franck Nijhof
aa3657e071
Bump version to 2023.4.0dev0 () 2023-02-22 21:29:49 +01:00
Erik Montnemery
cc564026fa
Move EntityCategory to homeassistant.const ()
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
Franck Nijhof
7d672b4a4d
Bump version to 2023.3.0dev0 () 2023-01-25 20:50:44 +01:00
SgtBatten
0ccab19d2c
Add Mega Joule as valid unit of energy ()
* Add Mega joule

* Reorder valid energy types

Alphabetical

* Add Mega Joule

* Add Mega Joule as valid energy unit

* Add Mega Joule

* Add Mega Joule as a Unit of Measurement to Energy

* Update tests

* Update tests

* Update number docstring

Co-authored-by: Roving Ronin <108674933+Roving-Ronin@users.noreply.github.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-01-25 14:13:42 +01:00
Franck Nijhof
5102d1a5f3
Drop Python 3.9 support () 2023-01-22 20:40:33 +01:00
J. Nick Koston
57239769ba
Only build compressed states once () 2023-01-09 12:07:32 -10:00
Franck Nijhof
ba24cb6e72
Bump version to 2023.2.0dev0 () 2022-12-28 18:46:04 +01:00
epenet
bbecf6ca37
Introduce unit enums for volume flow rate () 2022-12-21 09:28:49 +01:00
epenet
f4c13645d2
Add support for CCF volume unit () 2022-12-19 14:57:04 +01:00
Michaël Arnauts
627a208d9f
Use a global const for CONF_UUID () 2022-12-19 12:16:30 +01:00
epenet
4a848e8222
Add stones to mass units () 2022-12-13 17:35:14 +01:00
epenet
96c442349f
Introduce unit enums for sound pressure ()
* Introduce unit enums for sound pressure

* Adjust based on architecture comment

* Adjust
2022-12-08 20:06:02 +01:00
epenet
90438edc17
Introduce unit enums for irradiance () 2022-12-08 18:41:38 +01:00
epenet
0eacd84ff3
Introduce unit enums for apparent power () 2022-12-08 18:23:23 +01:00
epenet
b8613ec09d
Allow cm in precipitation units ()
* Use new device class in zamg

* Adjust docstring

* Undo component changes
2022-12-06 10:34:58 +01:00
epenet
67192d4ea7
Introduce unit enums for information and data rate ()
* Introduce UnitOfData enum

* Introduce UnitOfDataRate enum

* UnitOfData > UnitOfInformation
2022-12-05 23:32:00 +01:00
epenet
7eda67be11
Introduce unit enums for electric current and potential ()
* Introduce UnitOfElectricCurrent enum

* Introduce UnitOfElectricalPotential enum

* UnitOfElectricalPotential > UnitOfElectricPotential
2022-12-05 23:31:43 +01:00
epenet
8fdf35b80a
Introduce UnitOfFrequency enum () 2022-12-05 20:03:47 +01:00
epenet
6295cf3dc4
Introduce UnitOfTime enum () 2022-12-05 20:03:27 +01:00
Franck Nijhof
4bef6ac191
Bump version to 2023.1.0dev0 () 2022-11-30 21:12:57 -05:00