Commit Graph

1420 Commits (a4cb64e20e51388273c4194fb2c495d93341beef)

Author SHA1 Message Date
Jan Bouwhuis b4741c2069
Add data descriptions to MQTT config flow. (#105301)
* Add data descriptions to MQTT config flow.

* Remove keep allive, correct text CA cert
2023-12-15 16:30:54 +01:00
Erik Montnemery 9020dbb093
Remove context_recent_time property from entity base class (#105652) 2023-12-14 08:33:31 +01:00
Marc Mueller b71f488d3e
Update pylint to 3.0.3 (#105491) 2023-12-11 17:04:07 +01:00
Jan Bouwhuis e5a115ce1f
Fix mqtt json light state updates using deprecated color handling (#105283) 2023-12-08 16:54:02 +01:00
Jan Bouwhuis e8475b9b33
Add scaling utils for brightness and fanspeed (#104753)
Co-authored-by: Robert Resch <robert@resch.dev>
2023-12-04 12:10:58 +01:00
Jan Bouwhuis 4bf88b1690
Improve MQTT json light brightness scaling (#104510)
* Improve MQTT json light brightness scaling

* Revert unrelated changes

* Format
2023-11-29 16:42:10 +01:00
Jan Bouwhuis 82264a0d6b
Fix mqtt cover state is open after receiving stopped payload (#104726) 2023-11-29 16:29:42 +01: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
Aarni Koskela 706add4a57
Switch formatting from black to ruff-format (#102893)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:38:59 +01:00
Jan Bouwhuis 8a1f7b6802
Add translation key for some mqtt exceptions (#104550) 2023-11-26 17:33:54 +01:00
Jan Bouwhuis af71c2bb45
Raise and suppress stack trace when reloading yaml fails (#102410)
* Allow async_integration_yaml_config to raise

* Docstr - split check

* Implement as wrapper, return dataclass

* Fix setup error handling

* Fix reload test mock

* Move log_messages to error handler

* Remove unreachable code

* Remove config test helper

* Refactor and ensure notifications during setup

* Remove redundat error, adjust tests notifications

* Fix patch

* Apply suggestions from code review

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

* Follow up comments

* Add call_back decorator

* Split long lines

* Update exception abbreviations

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-11-24 17:34:45 +01:00
Jan Bouwhuis 68f8b2cab5
Fix mqtt json light allows to set brightness value >255 (#104220) 2023-11-19 19:50:25 +01:00
Erik Montnemery d8a49b14e5
Use relative paths in configuration validation error messages (#104064) 2023-11-16 10:56:47 +01:00
Erik Montnemery 5b37096b5f
Refactor config.async_log_exception (#104034)
* Refactor config.async_log_exception

* Improve test coverage

* Make functions public
2023-11-15 19:09:49 +01:00
Jan Bouwhuis 7ca264e746
Fix raising vol.Invalid during mqtt config validation instead of ValueError (#103764) 2023-11-13 22:59:03 +01:00
Jan Bouwhuis db97e7588b
Fix entity category for binary_sensor fails setup (#103511) 2023-11-08 14:10:24 +01:00
Jan Bouwhuis cbccdbc6fa
Fix entity category for sensor fails mqtt sensor platform setup (#103449) 2023-11-08 00:03:47 +01:00
Jan Bouwhuis 54cf7010cd
Add ServiceValidationError and translation support (#102592)
* Add ServiceValidationError

* Add translation support

* Extend translation support to HomeAssistantError

* Add translation support for ServiceNotFound exc

* Frontend translation & translation_key from caller

* Improve fallback message

* Set websocket_api as default translation_domain

* Add MQTT ServiceValidationError exception

* Follow up comments

* Revert removing gueard on translation_key

* Revert test changes to fix CI test

* Follow up comments

* Fix CI test

* Follow up

* Improve language

* Follow up comment
2023-11-06 15:45:04 +01:00
Jan Bouwhuis 4a4d2ad743
Fix mqtt config validation error handling (#103210)
* Fix MQTT config check

* Fix handling invalid enity_category for sensors

* Improve docstr

* Update comment

* Use correct util for yaml dump
2023-11-02 10:57:00 +01:00
Jan Bouwhuis daee5baef6
Fix mqtt is not reloading without yaml config (#103159) 2023-11-01 09:25:56 +01:00
Jirka 422af9d438
Update MQTT QoS description string (#103036)
Update strings.json
2023-10-30 09:54:46 +01:00
Jan Bouwhuis 8eaf38cd44
Fix mqtt schema import not available for mqtt_room (#102866) 2023-10-27 10:51:45 +02:00
Jan Bouwhuis 973b8900a9
Optimize mqtt platform setup (#102449)
* Optimize mqtt platform setup and correct issue

* Avoid coroutine for setup entity from discovery

* Avoid extra check

* Revert string constants

* Add comment
2023-10-22 08:31:08 +02:00
Jan Bouwhuis 242124504b
Improve mqtt config issue string constants (#102496)
Improve config issue string constants
2023-10-22 00:21:55 +02:00
Jan Bouwhuis 1bd0b2d05f
Refactor mqtt entity cleanup on reload (#102375) 2023-10-20 20:28:04 +02:00
Jan Bouwhuis 485c52568d
Fix error handling on subscribe when mqtt is not initialized (#101832) 2023-10-20 15:16:45 +02:00
Jan Bouwhuis 25ab622b51
Rename mqtt entry setup helpers to reflect their purpose (#102378)
Rename mqtt entry setup helpers
2023-10-20 13:36:24 +02:00
Jan Bouwhuis 7d9014ae41
Do not fail MQTT setup if events or sensors configured via yaml can't be validated (#102309)
* Add event and sensor

* Cleanup unused code

* Schema cannot be None for supported platform
2023-10-20 12:09:52 +02:00
Jan Bouwhuis 1efbba2631
Do not fail MQTT setup if covers configured via yaml can't be validated (#102304)
Add cover
2023-10-20 10:51:42 +02:00
Jan Bouwhuis 12c4a10cfc
Do not fail MQTT setup if numbers configured via yaml can't be validated (#102316)
Add number
2023-10-20 10:51:14 +02:00
Jan Bouwhuis f1eb28b7ac
Do not fail MQTT setup if update entities configured via yaml can't be validated (#102324) 2023-10-20 10:14:25 +02:00
Jan Bouwhuis c7b1e4186b
Do not fail MQTT setup if water heaters configured via yaml can't be validated (#102326) 2023-10-20 08:15:09 +02:00
Jan Bouwhuis 04fdcbe5fa
Do not fail MQTT setup if buttons configured via yaml can't be validated (#102301) 2023-10-20 08:13:59 +02:00
Jan Bouwhuis dcdd4b470c
Do not fail MQTT setup if lawn mowers configured via yaml can't be validated (#102314) 2023-10-20 08:11:33 +02:00
Jan Bouwhuis 5264cdf382
Do not fail MQTT setup if locks configured via yaml can't be validated (#102315)
Add lock
2023-10-20 01:13:35 +02:00
Jan Bouwhuis f4e7c5aed3
Do not fail MQTT setup if humidifiers configured via yaml can't be validated (#102312)
Add humidifier
2023-10-19 23:29:49 +02:00
Jan Bouwhuis ec1b3fe6fb
Do not fail MQTT setup if switches configured via yaml can't be validated (#102320)
Add switch
2023-10-19 23:04:35 +02:00
Jan Bouwhuis 54c80491e3
Do not fail MQTT setup if select's configured via yaml can't be validated (#102318)
Add select
2023-10-19 22:10:45 +02:00
Jan Bouwhuis e26a2596af
Do not fail MQTT setup if climate's configured via yaml can't be validated (#102303)
Add climate
2023-10-19 21:14:45 +02:00
Jan Bouwhuis 22c21fdc18
Do not fail MQTT setup if vacuum's configured via yaml can't be validated (#102325)
Add vacuum
2023-10-19 20:11:09 +02:00
Jan Bouwhuis 5eb0a33795
Do not fail MQTT setup if text's configured via yaml can't be validated (#102322)
Add text
2023-10-19 18:51:47 +02:00
Jan Bouwhuis 1456809f6a
Do not fail MQTT setup if sirens configured via yaml can't be validated (#102319)
Add siren
2023-10-19 18:50:50 +02:00
Jan Bouwhuis d0341c9754
Do not fail MQTT setup if images configured via yaml can't be validated (#102313)
Add image
2023-10-19 18:50:02 +02:00
Jan Bouwhuis 3853214496
Do not fail MQTT setup if fans configured via yaml can't be validated (#102310)
Add fan
2023-10-19 18:48:35 +02:00
Jan Bouwhuis 615b02be59
Do not fail MQTT setup if scenes configured via yaml can't be validated (#102317)
Add scene
2023-10-19 18:27:04 +02:00
Jan Bouwhuis 3a4341dbeb
Do not fail MQTT setup if device trackers configured via yaml can't be validated (#102308)
Add device_tracker
2023-10-19 18:18:04 +02:00
Jan Bouwhuis fb984b5218
Do not fail MQTT setup if camera's configured via yaml can't be validated (#102302)
Add camera
2023-10-19 18:17:06 +02:00
Jan Bouwhuis 651b725cc0
Do not fail MQTT setup if binary sensors configured via yaml can't be validated (#102300)
Add binary_sensor
2023-10-19 18:15:21 +02:00
Jan Bouwhuis d149bffb07
Do not fail MQTT setup if lights configured via yaml can't be validated (#101649)
* Add light

* Deduplicate code

* Follow up comment
2023-10-19 17:34:43 +02:00
Jan Bouwhuis c377cf1ce0
Do not fail mqtt entry on single platform config schema error (#101373)
* Do not fail mqtt entry on platform config

* Raise on reload with invalid config

* Do not store issues

* Follow up
2023-10-19 12:06:33 +02:00