Commit Graph

21 Commits (56942504453a24fdaba2fe47f80c78a8dbbc72b1)

Author SHA1 Message Date
Damien Duboeuf 67c2747027
Add MQTT object_id option (#58728)
* Add MQTT object_id option

* Add MQTT object_id option

* Add MQTT object_id option

* Add MQTT object_id option - Fix light and vacuum

* Add MQTT object_id option - Fix light and vacuum

* Add MQTT object_id option - Fix lock

* Add MQTT object_id option - Fix device

* Add MQTT object_id option - Fix device

* Update tests/components/mqtt/test_discovery.py

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

* Change deprecated method

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-11-08 14:02:18 +01:00
epenet a8a8b532d0
Use DeviceInfo in mqtt (#58389)
* Use DeviceInfo in mqtt

* Updates for mypy

Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-10-25 13:46:09 +02:00
Erik Montnemery 1eebe45154
Add support for entity categories to MQTT entities (#57656)
* Add support for entity categories to MQTT entities

* Improve test

* Apply suggestions from code review

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

* Update homeassistant/components/mqtt/mixins.py

Co-authored-by: Paul Monigatti <paulmonigatti@users.noreply.github.com>

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Paul Monigatti <paulmonigatti@users.noreply.github.com>
2021-10-15 14:28:30 +02:00
Franck Nijhof eed9f67402
Add service configuration URL to MQTT (#57731) 2021-10-14 18:27:40 -07:00
Jan Bouwhuis a36a765352
Allow MQTT discovery availability shortcut (#57479)
* replace base in availability topic

* add tests for availability shortcuts - fix import

* group constants

* simplified loop

* Moving constants to .const

* rename value to topic

* move CONF_TOPIC to .const

* move CONF_AVAILABILITY to .const

* remove check for string

* Silently ignore if no config topic is found.

* CONF_TOPIC should be required
2021-10-11 23:37:31 +02:00
Marc Mueller 364767ff22
Import Callable from collections.abc (4) (#56778) 2021-09-29 16:15:36 +02:00
Erik Montnemery 3432efddaa
Remember state of MQTT availability topics when reconfiguring (#55199) 2021-08-25 12:23:42 +02:00
Erik Montnemery 4d32e1ed01
Minor improvements of MQTT typing (#52578)
* Minor improvements of MQTT typing

* Tweak
2021-07-06 14:38:48 +02:00
Erik Montnemery 79ee112490
Enable basic type checking for mqtt (#52463)
* Enable basic type checking for mqtt

* Tweak
2021-07-05 10:33:12 +02:00
Erik Montnemery 7a4f3fe7b8
Filter MQTT light JSON attributes (#52242) 2021-06-28 14:37:26 +02:00
Erik Montnemery 04c9665241
Filter MQTT JSON attributes (#52076)
* Filter JSON attributes

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Refactor, add tests

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-06-24 16:22:54 +02:00
Erik Montnemery 8ad3c65645
Allow MQTT entities to be disabled by default (#48284)
* Allow MQTT entities to be disabled by default

* Tweak
2021-03-30 00:09:14 +02:00
Marc Mueller 25a13d1554
Update typing 10 (#48071) 2021-03-18 13:07:04 +01:00
RadekHvizdos 9f4c2f6260
Add suggested_area to MQTT discovery (#47903)
* Add suggested_area to MQTT Discovery

This adds suggested_area to MQTT discovery, so that the discovered devices could be automatically added to the proper area.

* Add abbreviation for MQTT suggested_area

* Remove extra whitespace

* Remove extra whitespace #2

* Added tests for MQTT Dicovery of suggested_area

* Fix test for MQTT suggested_area

* Better tests of MQTT suggested_area

Changes made as per feedback from @emontnemery
2021-03-15 20:02:02 +01:00
Erik Montnemery 14a59d290a
Update integrations j-o to override extra_state_attributes() (#47758) 2021-03-11 20:11:25 +01:00
Kristian Heljas 9e487eb260
Hoist mqtt name property and add icon support to MqttEntity (#47165)
* hoist common MqttEntity properties

* remove default name for MqttEntity

Default naming is sensible enough

* disable overriding common MqttEntity schema

* merge common MqttEntity schemas into MQTT_ENTITY_COMMON_SCHEMA
2021-03-11 13:42:13 +01:00
Paulus Schoutsen 9e07910ab0
Mark entities as unavailable when they are removed but are still registered (#45528)
* Mark entities as unavailable when they are removed but are still registered

* Add sync_entity_lifecycle to collection helper

* Remove debug print

* Lint

* Fix tests

* Fix tests

* Update zha

* Update zone

* Fix tests

* Update hyperion

* Update rfxtrx

* Fix tests

* Pass force_remove=True from integrations

Co-authored-by: Erik <erik@montnemery.com>
2021-02-08 10:45:46 +01:00
Erik Montnemery d60fc0de38
Add availability_mode "all" and "any" to MQTT entities (#44987)
* Add availability_mode "all" to MQTT entities

* Add availability mode any
2021-01-11 16:04:22 +01:00
Erik Montnemery 248802efd5
Add MQTT base entity (#44971) 2021-01-09 17:46:53 +01:00
Erik Montnemery 6dd6d9b368
Deduplicate MQTT entity discovery code (#44970) 2021-01-09 14:37:33 +01:00
Erik Montnemery b85efd343f
Move MQTT entity helpers to separate file (#44838)
* Move MQTT entity helpers to separate file

* Fix imports

* Update MQTT number

* Review comments

* Fix formatting
2021-01-09 00:47:17 +01:00