Commit Graph

920 Commits (24a0007785e65e1043e0bdd55e7524ef0a7ccdad)

Author SHA1 Message Date
epenet a0f741778a
Use HVACAction in mqtt (#71726) 2022-05-12 14:12:21 +02:00
TheHolyRoger 0fcdca2d71
Add optional base64 decoding of mqtt camera image (#71223)
Add unittest for b64 decoding of camera, fix linting
2022-05-09 21:40:15 +02:00
epenet 141688e210
Cleanup ServiceInfo compatibility (#60540)
Co-authored-by: epenet <epenet@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-05-09 14:17:48 +02:00
epenet 1be2438ef6
Use climate enums in mqtt (#70696) 2022-05-09 08:15:11 +02:00
Erik Montnemery e9abfad361
Reject MQTT topics which include control- or non-characters (#71263) 2022-05-03 12:19:43 -07:00
epenet 09d61edd9f
Use LightEntityFeature enum in mqtt (#71055) 2022-04-29 22:47:26 +03:00
Erik Montnemery 2f9beb4a4a
Deprecate white_value support in MQTT light (#71002) 2022-04-29 08:37:49 +02:00
epenet a8a7359c6f
Use VacuumEntityFeature in mqtt (#70570)
* Use VacuumEntityFeature in mqtt

* Fix tests
2022-04-25 11:34:06 +02:00
epenet 38d86fc7b1
Use ColorMode enum in mqtt (#70579) 2022-04-24 09:06:56 -10:00
Franck Nijhof 1e4aacaeb1
Replace Alarm Control Panel FORMAT_ constants with CodeFormat enum (#69861) 2022-04-18 19:37:32 +02:00
Jan Bouwhuis 3b2aae5045
Refactor MQTT discovery (#67966)
* Proof of concept

* remove notify platform

* remove loose test

* Add rework from #67912 (#1)

* Move notify serviceupdater to Mixins

* Move tag discovery handler to Mixins

* fix tests

* Add typing for async_load_platform_helper

* Add add entry unload support for notify platform

* Simplify discovery updates

* Remove not needed extra logic

* Cleanup inrelevant or duplicate code

* reuse update_device and move to mixins

* Remove notify platform

* revert changes to notify platform

* Rename update class

* unify tag entry setup

* Use shared code for device_trigger `update_device`

* PoC shared dispatcher for device_trigger

* Fix bugs

* Improve typing - remove async_update

* Unload config_entry and tests

* Release dispatcher after setup and deduplicate

* closures to methods, revert `in` to `=`, updates

* Re-add update support for tag platform

* Re-add update support for device-trigger platform

* Cleanup rediscovery code revert related changes

* Undo discovery code shift

* Update homeassistant/components/mqtt/mixins.py

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

* Update homeassistant/components/mqtt/device_trigger.py

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

* Update homeassistant/components/mqtt/mixins.py

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

* revert doc string changes

* move conditions

* typing and check config_entry_id

* Update homeassistant/components/mqtt/mixins.py

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

* cleanup not used attribute

* Remove entry_unload code and tests

* update  comment

* add second comment

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-04-15 12:35:08 +02:00
epenet 89dd199ac2
Use SirenEntityFeature enum in mqtt (#69647) 2022-04-08 10:37:12 +02:00
epenet 3e426c0fa6
Use EntityFeature enum in mqtt (#69416) 2022-04-07 09:44:26 +02:00
epenet 4c7e1fe060
Cleanup ENTITY_CATEGORIES_SCHEMA (#66549)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-04-01 09:40:43 -07:00
Erik Montnemery 9b21a48048
Mend incorrectly imported MQTT config entries (#68987)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-04-01 08:11:31 -07:00
Paulus Schoutsen 130ca2213f
Enforce EntityCategory enum (#69015)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-03-31 15:04:33 -07:00
Jan Bouwhuis 4db2270f3d
Refactor MQTT scene to inherit MqttEntity (#68883)
* MQTT scene inherrits MqttEntity

* Default payload_on matches documentation

* remove CONF_ENABLED_BY_DEFAULT from schema return True as default

* Add to the schema, remove not overrided properties

* remove default payload_on

* Update homeassistant/components/mqtt/scene.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-03-30 15:46:45 +02:00
epenet bfd84ba89c
Prettify yaml (services.yaml) (#68878) 2022-03-30 09:48:06 +02:00
Erik Montnemery 7e8d52e5a3
Fix race when handling rapid succession of MQTT discovery messages (#68785)
Co-authored-by: jbouwh <jan@jbsoft.nl>
2022-03-29 20:26:11 -07:00
epenet 5830481a53
Use new CONF_MODEL in mqtt (#68832)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-29 12:49:00 +02:00
Paulus Schoutsen 69fcce3b2c
Remove energy usage from the switch base class (#68821)
* Remove energy usage from the switch base class

* Remove unused attributes from integrations
2022-03-28 18:56:04 -10:00
Marc Mueller 911b159281
Cleanup after pylint update (#68657) 2022-03-26 00:34:12 +01:00
Jan Bouwhuis 5afe8fd2db
Revert "Add MQTT notify platform (#64728)" (#68505)
This reverts commit e574a3ef1d.
2022-03-22 12:51:24 +01:00
Jan Bouwhuis c8fb86a8ed
Fix MQTT false positive deprecation warnings (#68117) 2022-03-14 12:39:44 +01:00
GitHub Action c64b4d997b [ci skip] Translation update 2022-03-13 00:18:58 +00:00
GitHub Action dc31f420ed [ci skip] Translation update 2022-03-12 00:17:47 +00:00
Erik Montnemery e5523ef6b6
Correct local import of paho-mqtt (#67944)
* Correct local import of paho-mqtt

* Remove MqttClientSetup.mqtt class attribute

* Remove reference to MqttClientSetup.mqtt
2022-03-10 10:32:49 +01:00
GitHub Action d0afc31063 [ci skip] Translation update 2022-03-10 00:17:10 +00:00
J. Nick Koston 723dcbafca
Complete fan speed transition from #59781 (#67743) 2022-03-09 10:38:12 +01:00
Jan Bouwhuis e574a3ef1d
Add MQTT notify platform (#64728)
* Mqtt Notify service draft

* fix updates

* Remove TARGET config parameter

* do not use protected attributes

* complete tests

* device support for auto discovery

* Add targets attribute and support for data param

* Add tests and resolve naming issues

* CONF_COMMAND_TEMPLATE from .const

* Use mqtt as default service name

* make sure service  has a unique name

* pylint error

* fix type error

* Conditional device removal and test

* Improve tests

* update description has_notify_services()

* Use TypedDict for service config

* casting- fix discovery - hass.data

* cleanup

* move MqttNotificationConfig after the schemas

* fix has_notify_services

* do not test log for reg update

* Improve casting types

* Simplify obtaining the device_id

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

* await not needed

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

* Improve casting types and naming

* cleanup_device_registry signature change and black

* remove not needed condition

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-03-08 16:27:18 +01:00
Jan Bouwhuis 98adeb6070
Fix false positive MQTT climate deprecation warnings for defaults (#67661)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-03-07 15:38:33 +01:00
Jan Bouwhuis 5ab4b5d15a
MQTT Improve warning override deprecated settings (#67609) 2022-03-04 12:39:29 +01:00
Jan Bouwhuis 9356bf1a8e
Fix MQTT config flow with advanced parameters (#67556)
* Fix MQTT config flow with advanced parameters

* Add test
2022-03-03 21:40:15 +01:00
Jan Bouwhuis a97fe7aae0
Mqtt fix issue with displaying non UTF-8 payload (#67471)
* Mqtt fix issue with displaying non UTF-8 payload

* None or binary

* Casting and additional test

* casting
2022-03-02 17:01:47 +01:00
GitHub Action e963ad96d4 [ci skip] Translation update 2022-03-01 00:23:47 +00:00
Erik Montnemery 5e4b16c69a
Remove custom WS command for removing MQTT devices (#67381)
* Remove custom WS command for removing MQTT devices

* Re-add removed test
2022-02-28 15:50:49 +01:00
Erik Montnemery c7d59bb272
Fix race when unsubscribing from MQTT topics (#67376)
* Fix race when unsubscribing from MQTT topics

* Improve test
2022-02-28 14:19:50 +01:00
Franck Nijhof 21f3e5ef13
Fix MQTT config entry deprecation warnings (#67174) 2022-02-24 18:14:38 +01:00
epenet e37402e1d5
Import tag (#64539)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-23 09:55:31 -08:00
Jan Bouwhuis 845bf80e72
Mqtt improve test coverage (#66279)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-02-23 12:29:32 +01:00
Erik Montnemery c879bf295b
Deprecate manual MQTT configuration available in config flow (#66247) 2022-02-23 09:41:44 +01:00
GitHub Action bdcdf52225 [ci skip] Translation update 2022-02-23 00:20:00 +00:00
GitHub Action 102ae9f0e3 [ci skip] Translation update 2022-02-22 00:17:23 +00:00
rubenverhoef 95de1dd446
Additional MQTT light command templates (#63361)
Co-authored-by: jbouwh <jan@jbsoft.nl>
2022-02-22 00:00:49 +01:00
GitHub Action c4cc6ca0ba [ci skip] Translation update 2022-02-20 00:20:09 +00:00
Marc Mueller 45d8d04c40
Use assignment expressions [other] (#66882) 2022-02-19 17:22:51 +01:00
Erik Montnemery fcf774ecfc
Small cleanup of MQTT mixins (#66812) 2022-02-18 16:51:14 +01:00
Erik Montnemery ba6d1976df
Improve MQTT device removal (#66766)
* Improve MQTT device removal

* Update homeassistant/components/mqtt/mixins.py

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

* Adjust tests

* Improve test coverage

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-02-18 13:45:25 +01:00
Erik Montnemery 2abcd7cd94
Correct state restoring for MQTT temperature sensors (#66741)
* Correct state restoring for MQTT temperature sensors

* Adjust test

* Adjust test
2022-02-18 11:35:44 +01:00
Erik Montnemery 98982c86e4
Add MQTT diagnostics (#66730)
* Add MQTT diagnostics

* Redact device tracker location

* Adjust tests

* Address comments from code review
2022-02-18 09:28:49 +01:00