Commit graph

1258 commits

Author SHA1 Message Date
Marc Mueller
4fbb14ecc7
Update mypy to 1.0.0 (#87586) 2023-02-07 02:31:14 +01:00
Franck Nijhof
939eef3b28
Remove translations from Core (#87543)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-06 15:06:43 +01:00
Jan Bouwhuis
212e172be2
Cleanup not used schema validator for MQTT vacuum (#87462)
* Cleanup not used schema validator for MTT vacuum

* Only leave warning
2023-02-06 13:34:36 +01:00
Franck Nijhof
28b6306ad6
Remove use of Number DEVICE_CLASSES_SCHEMA from MQTT (#87345) 2023-02-04 00:08:15 +01:00
Franck Nijhof
fcb612cd6f
Collection of code styling tweaks (#87344) 2023-02-03 23:51:27 +01:00
Franck Nijhof
ca1a12898c
Enable Ruff D212 (#87347) 2023-02-03 23:08:48 +01:00
epenet
810367b757
Fix can not typo (#87254) 2023-02-03 11:37:16 +01:00
Franck Nijhof
5e81d28116
Update black to 23.1.0 (#87188) 2023-02-02 18:35:24 +01:00
GitHub Action
0f80932709 [ci skip] Translation update 2023-02-02 00:25:01 +00:00
Jan Bouwhuis
33ede351f0
Cleanup code for parsing yaml MQTT config (#86944)
* Cleanup code for parsing yaml configs

* Add abstractmethod decorator to async_update

* Replace get() with default-list ensured by schema
2023-01-31 08:24:33 +01:00
Jan Bouwhuis
e57dad79fc
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 19:15:11 +01:00
Jan Bouwhuis
6a94a58325
Correct stale doc string for MQTT tag platform (#86862) 2023-01-29 00:23:22 +02:00
Franck Nijhof
e738924780
Enable Ruff SIM105 (#86759)
* Enable Ruff SIM105

* Adjust existing cases
2023-01-26 21:06:22 -05:00
Franck Nijhof
b7de185924
Fix CI, missing import in MQTT (#86517) 2023-01-24 11:40:40 +01:00
Jan Bouwhuis
42ca46d7b2
Remove redundant label for MQTT CA verification selector (#86236)
Remove redundant label for MQTT CA verification
2023-01-24 09:38:00 +01:00
GitHub Action
613aa6f43a [ci skip] Translation update 2023-01-24 00:24:57 +00:00
Jan Bouwhuis
8672be3829
Always add code to template vars MQTT lock command template (#86460)
Always add `code` to template vars lock cmd tpl
2023-01-23 16:08:25 +01:00
Marc Mueller
6f94e47270
Update Union typing (6) [Py310] (#86454) 2023-01-23 15:01:07 +01:00
Jan Bouwhuis
f719ecf086
Add command template and code_format support for MQTT lock (#85830)
* Add command template for MQTT lock

* Fix tests
2023-01-23 14:48:07 +01:00
Marc Mueller
077ca97ef8
Fix local_partial_types errors (#86410)
Fix local_partial_types errors
2023-01-23 10:29:11 +01:00
Marc Mueller
8abce25948
Update Union typing (4) [Py310] (#86427) 2023-01-23 09:04:40 +01:00
Marc Mueller
d7dda6bee5
Update python version used for pylint [Py310] (#86414)
* Update python version used for pylint linting [Py310]

* Import Callable from collections.abc [Py310]

* Use builtin anext [Py310]
2023-01-23 07:56:15 +01:00
GitHub Action
4d215e573c [ci skip] Translation update 2023-01-23 00:23:13 +00:00
Jan Bouwhuis
66c3115b26
Improve MQTT transport select label (#86216) 2023-01-22 22:12:06 +01:00
GitHub Action
771e07c68b [ci skip] Translation update 2023-01-22 00:25:52 +00:00
GitHub Action
e1483ff746 [ci skip] Translation update 2023-01-21 00:24:12 +00:00
Franck Nijhof
79b52a2b41
Stricter pylint message control (#86154) 2023-01-20 13:47:55 +01:00
Jan Bouwhuis
92742ae423
Add jammed state support for MQTT lock (#86010)
* Add jammed state support for MQTT lock

* Correct payload jammed key

* Add tests - rename solved to ok

* Rename jammed state and template topics to motor

* Use state topic for handling motor state

* Follow up comments

* Change default behaviour `state_unjammed`

* Skip `state_unjammed`
2023-01-20 12:19:26 +01:00
GitHub Action
59ad232ce5 [ci skip] Translation update 2023-01-20 00:25:31 +00:00
GitHub Action
d1ecc418bb [ci skip] Translation update 2023-01-19 00:25:04 +00:00
GitHub Action
87b2a73460 [ci skip] Translation update 2023-01-18 00:24:40 +00:00
Jan Bouwhuis
25392655e7
Allow translating select selector options (#85531)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-01-17 16:22:19 +01:00
Patrick ZAJDA
0b02abf708
Add locking and unlocking to MQTT lock (#85779)
* Implement locking, unlocking and jammed on MQTT lock

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>

* Add tests

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>

* Refactor condition

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>

* Parametrize tests

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>

* Manage only locking and unlocking

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>

* Remove jammed from abbreviations

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* set valid states in self._valid_states

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>

Signed-off-by: Patrick ZAJDA <patrick@zajda.fr>
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2023-01-16 08:42:43 +01:00
GitHub Action
77f9548e51 [ci skip] Translation update 2023-01-15 00:25:52 +00:00
Shay Levy
6938f791f9
Downgrade MQTT logging (#85867) 2023-01-14 13:28:41 +01:00
GitHub Action
dffc913f9e [ci skip] Translation update 2023-01-14 00:22:57 +00:00
Jan Bouwhuis
64e235285d
Deprecate power_command_topic for MQTT climate (#85229)
* Deprecate mode_command_topic for MQTT climate

* Correct deprecation and remove support release inf

* Do not use future tense for comment

* Extend deprecation period to 6 months
2023-01-12 09:49:14 +01:00
Franck Nijhof
800b8abe39
Code styling tweaks to the MQTT integration (#85463) 2023-01-08 22:07:10 +01:00
Jan Bouwhuis
ee21bc5d7f
Allow MQTT device_class or state_class to be set as None (#85106)
* Allow MQTT device_class to be set as `None`

* Add test

* Also allow sensor state_class to be `None`
2023-01-04 15:21:07 +01:00
Jan Bouwhuis
9f24897814
Do not reset current selection on reconfig or MQTT select (#85099)
* Do not reset current selection on reconfig

* Add a test
2023-01-04 10:29:53 +01:00
Jan Bouwhuis
b29c96639b
Correct initial config of MQTT climate (#85097)
* Do not reset MQTT climate state on re-config

* More corrections

* Correct startup behavior in optimistic mode
2023-01-04 10:29:02 +01:00
GitHub Action
5169721916 [ci skip] Translation update 2023-01-04 00:22:58 +00:00
Mike K
799d527fb5
Add MQTT climate setting for current humidity (#84592)
* MQTT Climate: Add support for setting the current humidity via MQTT

* MQTT Climate: Add configuration constants related to setting the target humidity

* MQTT Climate: Add support for setting the humidity's state topic & template

* MQTT Climate: Add support for setting the initial humidity

* MQTT Climate: Add support for setting the humidity's command topic & template

* MQTT Climate: Add support for setting the min/max humidity

* MQTT Climate: Fix style & tests

* MQTT Climate: Set the initial humidity to None

* MQTT Climate: Rename _set_mqtt_attribute to _set_climate_attribute and handle_temperature_received to handle_climate_attribute_received

* MQTT Climate: Copy humidity range validation from MQTT Humidifier

* MQTT Climate: Remove CONF_HUMIDITY_INITIAL

* MQTT Climate: Only enable support for TARGET_HUMIDITY when the command topic is set

* MQTT Climate: Check if setting the target humidity is supported before actually setting it

* MQTT Climate: Make sure that CONF_HUMIDITY_COMMAND_TOPIC has been configured when setting CONF_HUMIDITY_STATE_TOPIC

* MQTT Climate: Fix broken tests

* MQTT Climate: Add test for optimistically setting the target humidity

* MQTT Climate: Remove references to "temperature" in handle_climate_attribute_received

* MQTT Climate: Add additional humidity-related tests

* MQTT Climate: Remove supported feature check in handle_target_humidity_received

It's not needed because this is covered by the `valid_humidity_state_configuration` validation.

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* MQTT Climate: Remove supported feature check in async_set_humidity

It is covered by the base Climate entity.

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2023-01-03 22:57:20 +01:00
Sándor Oroszi
a0d41e1d97
Add hs_command_template and xy_command_template to mqtt light default schema (#84988)
* Add mqtt light hs_command_template

* Add mqtt light xy_command_template
2023-01-03 12:58:00 +01:00
Jan Bouwhuis
9cf86b234b
Add optimistic option for MQTT climate (#84777) 2023-01-02 11:39:42 +01:00
GitHub Action
6220804639 [ci skip] Translation update 2023-01-02 00:23:28 +00:00
Jan Bouwhuis
ee66ffc8de
Do not depend MQTT CI tests on debug logs (#84783)
* Do not depend MQTT CI tests on debug logs

* Leave Clean up expire as debug message
2022-12-29 18:29:28 +01:00
GitHub Action
b3ab0a0199 [ci skip] Translation update 2022-12-29 00:23:20 +00:00
GitHub Action
31a3f1100a [ci skip] Translation update 2022-12-24 00:19:43 +00:00
Franck Nijhof
baef267f33
String formatting and max line length - Part 3 (#84394) 2022-12-22 13:35:47 +01:00