1
mirror of https://github.com/home-assistant/core synced 2024-10-07 10:13:38 +02:00
Commit Graph

66 Commits

Author SHA1 Message Date
Jan Bouwhuis
5930f056a8
Mqtt support config_entry unload (#70149)
* squashed commits for rebase

* Flake

* Fix reloading issue manual legacy items

* Improve ACS sync for unsubscribe at disconnect

* Processed review comments

* Update homeassistant/components/mqtt/client.py

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

* No need to await entry setup

* Remove complication is_connected

* Update homeassistant/components/mqtt/__init__.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-07-12 11:07:18 +02:00
Erik Montnemery
f05b4a0ca0
Fire event_mqtt_reloaded only after reload is completed (#74226) 2022-06-30 10:15:25 -07:00
epenet
dac8f242e0
Improve type hints in mqtt and template alarms (#74101) 2022-06-28 13:41:23 +02:00
epenet
8e1ec07f3d
Adjust type hints in component alarm methods (#74092)
* Adjust type hints in component alarm methods

* Undo related change

* Undo related change
2022-06-28 10:00:23 +02:00
Jan Bouwhuis
57daeaa174
Fix MQTT config schema to ensure correct validation (#73619)
* Ensure config schema validation

* Use correct schema for device_tracker

* Remove schema validation from the platform setup

* Remove loop to build schema
2022-06-20 08:51:12 +02:00
Erik Montnemery
b97d346df7
Fix reload of MQTT yaml config (#72901) 2022-06-02 11:32:31 -07:00
Erik Montnemery
635d7085cf
Move MQTT config schemas and client to separate modules (#71995)
* Move MQTT config schemas and client to separate modules

* Update integrations depending on MQTT
2022-05-31 09:32:44 +02:00
Jan Bouwhuis
654b095498
Move manual configuration of MQTT alarm control panel to the integration key (#72165)
Add alarm_control_panel
2022-05-20 08:37:53 +02:00
Franck Nijhof
1e4aacaeb1
Replace Alarm Control Panel FORMAT_ constants with CodeFormat enum (#69861) 2022-04-18 19:37:32 +02:00
epenet
3e426c0fa6
Use EntityFeature enum in mqtt (#69416) 2022-04-07 09:44:26 +02:00
Erik Montnemery
fe38e6ba87
Drop MQTT import flow (#66160)
* Drop MQTT import flow

* Reload manually configured MQTT entities when config entry is setup

* Address review comments

* Actually remove the import flow
2022-02-10 21:09:57 +01:00
Erik Montnemery
8245ff7473
Log transmitted MQTT messages (#65550) 2022-02-04 17:35:32 +01:00
Erik Montnemery
f3a89de71f
Fix race when handling updated MQTT discovery data (#65415) 2022-02-02 17:12:22 -08:00
Jan Bouwhuis
7ea8d72133
Move CONF_COMMAND_TEMPLATE to .const (#64558) 2022-01-20 16:15:26 +01:00
Jan Bouwhuis
dd0193052c
Add MQTT encoding parameter for all subscribed topics (#62263)
* Add encoding parameter for all subscribable topics

* test setup encoding incoming payload

* remove support for device_tracker and tag+tests
2022-01-03 16:08:07 +01:00
Jan Bouwhuis
3ca18922e6
Mqtt rework on value templates (#62105)
* add MqttValueTemplate class

* support variables at initiation

* pass MqttEntity instead of hass

* Use MqttValueTemplace class for value templates

* make hass en enitity parameters conditional

* remove unused property and remove None assignment

* rename self._attr_value_template
2022-01-03 16:07:40 +01:00
Jan Bouwhuis
457ce195dd
Add mqtt entity attributes command templates (#61937)
* Add entity variables to MqttCommandTemplate

* missing command template update

* make hass and entity conditional parameters

* Add encoding support for publishing

* Revert "Add encoding support for publishing"

This reverts commit b69b9c60ec.
2022-01-03 15:10:15 +01:00
Jan Bouwhuis
d0c4f0fec4
Add mqtt encoding support for publishing (#62739)
* encoding support for mqtt publishing - todo tests

* signature allows None values for qos and retain

* common test for mqtt publishing encoding

* better test with command templates

* more tests

* fix tests alarm control panel+tests light basic

* tests light json and template

* add tests vacuum and fix tests light_template
2022-01-03 09:03:47 +01:00
epenet
2cc4d9846b
Add basic type hints to mqtt (#62875)
* Add basic type hints to mqtt

* Add hints to async_setup_platform

* Add type hint to async_setup_entry

* Fix pylint

* Set correct argument order in climate entity

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 08:53:52 +01:00
Jan Bouwhuis
d5defa8995
Support publishing MQTT messages with raw bytes payloads (#61090)
* correctly publish mqtt ouput

* Additional tests

* Add template test with binary output

* render_outgoing_payload with command templates

* use MqttCommandTemplate helper class

* add tests command_template

* Additional tests

* support pass-through for MqttComandTemplate

* fix bugs

* unify workform always initiate with hass

* clean up

* remove not needed lines

* comment not adding value
2021-12-15 11:28:43 +01:00
Raphaël Beamonte
8600b5597a
Add 'trigger' support for MQTT Alarm Control Panel (#60525)
When configuring an Alarm Control Panel through MQTT discovery, it
was not possible to use the trigger service. This fixes that by making
it available the same way as ARM and DISARM services are.
2021-11-29 14:41:52 +01:00
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
Erik Montnemery
0456a896e3
Avoid service call in MQTT async_publish function (#58441)
* Avoid service call in MQTT async_publish function

* Tweak

* Fix integrations + tests
2021-10-28 08:13:32 +02:00
Erik Montnemery
41e14c4871
Correct changes in Allow extra keys in MQTT discovery messages (#58534) 2021-10-27 16:33:02 +02:00
Erik Montnemery
640a7fee9d
Allow extra keys in MQTT discovery messages (#58390)
* Allow extra keys in MQTT discovery messages

* Remove extra keys
2021-10-25 13:47:06 +02:00
Marc Mueller
487fa0a905
Use assignment expressions 20 (#57969) 2021-10-20 20:31:00 +02:00
Jan Bouwhuis
58569a58a9
MQTT Alarm control panel - Enable remote code validation (#57764)
* Enable remote code validation

* Update homeassistant/components/mqtt/alarm_control_panel.py

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

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-10-19 12:07:38 +02:00
Jan Bouwhuis
879144b48d
MQTT rework constants (#57529)
* reference CONF_TOPIC to .const

* Organize common mqtt constants
2021-10-12 11:26:38 +02:00
posixx
547ede1e91
Implementation of new Vacation mode for MQTT-based alarm panels (#53561)
* Impelentation of new Vacation Mode for MQTT-based alarm panels

* Fixed typo

* another typo fix

* Split integrations: remove manual_mqtt

* added newline

* Impelentation of new Vacation Mode for MQTT-based alarm panels

* Fixed typo

* another typo fix

* Split integrations: remove manual_mqtt

* added newline

* missing abbreviation

* Fix tests

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-08-24 13:22:49 +02:00
Erik Montnemery
91b4f7d1d5
Filter MQTT alarm JSON attributes (#52278) 2021-06-29 10:32:23 +02:00
jan iversen
9410aefd0d
Integrations m*: Rename HomeAssistantType to HomeAssistant. (#49567) 2021-04-22 14:53:37 -07: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
tkdrob
b85ecc0bd2
Use core constants for mqtt (#46389) 2021-02-11 13:38:33 +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
Erik Montnemery
34bd70aee6
Fix race when handling MQTT discovery messages (#44730)
* Fix race when handling MQTT discovery messages

* Lint

* retrigger checks
2021-01-04 12:28:17 +01:00
Erik Montnemery
97edbaa85f
Small cleanup of MQTT (#44110)
* Use relative imports of mqtt component in mqtt platforms

* Correct parameters to _async_setup_entity

* Lint
2020-12-10 21:30:07 +01:00
Franck Nijhof
0e98bc5ea2
Skip template result parsing in several places (#42408)
* Skip template result parsing in several places

* Adjust alert integration

* Adjust Alexa integration

* Adjust apns integration

* Adjust arest integration

* Adjust dialogflow integration

* Adjust generic camera integration

* Adjust imap email content  integration

* Adjust InfluxDB integration

* Adjust intent integration

* Adjust logbook integration

* Adjust HP ILO integration

* Adjust manual alarm control panel integration

* Adjust manual mqtt alarm control panel integration

* Adjust minio integration

* Adjust mqtt integration

* Adjust notify integration

* Adjust persistent notification integration

* Adjust rest integration

* Adjust rss feed template integration

* Adjust slack integration

* Adjust Xiaomi integration

* Adjust TCP integration

* Adjust Telegram Bot integration

* Bump CI cache version

* Revert "Bump CI cache version"

This reverts commit 875efe58cf.

* Adjust demo tests
2020-10-26 19:29:10 +01:00
Erik Montnemery
4d6e694d14
Fix discovery update of MQTT state templates (#39901) 2020-09-10 20:52:23 +02:00
J. Nick Koston
65e53b8251
Support reloading mqtt yaml configuration (#39531) 2020-09-02 20:16:21 -05:00
Michaël Arnauts
d7d7ee6524
Use global CONF_UNIQUE_ID for mqtt (#38595)
* Use global CONF_UNIQUE_ID for mqtt

* Update __init__.py

* Update __init__.py

* Update __init__.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-08-09 16:00:14 -05:00
Erik Montnemery
6f7f5b4034
Rename AlarmControlPanel to AlarmControlPanelEntity (#34590) 2020-04-25 18:05:28 +02:00
Jevgeni Kiski
a1aebe904e
Add MQTT Alarm Control Panel custom bypass state (#32541)
* MQTT Alarm Control Panel to have all available states

* MQTT Alarm Control Panel to have all available states

* test_arm_custom_bypass_* tests added

* MQTT payload_arm_custom_bypass abbreviation
2020-04-06 11:45:37 +02:00
Erik Montnemery
fbd197146a
Add MQTT debug info for remaining MQTT integrations (#33506) 2020-04-01 11:48:32 -07:00
Erik Montnemery
7e387f93d6
Add MQTT WS command to remove device (#31989)
* Add MQTT WS command to remove device

* Review comments, fix test

* Fix tests
2020-02-24 20:46:02 -08:00
SukramJ
1fde0d18ed Add supported_features to Alarm Control Panel to limit device_actions (#29065)
* Add supported_features to Alarm Control Panel

* mark supported_features abstract

* Add SF to async_register_entity_service

* fix test

* Add missing SF SUPPORT_ALARM_ARM_CUSTOM_BYPASS

* isort

* fix async_register_entity_service

* Update alarm_control_panel.py
2019-11-25 15:42:53 -08:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Kevin Cooper
f722a6c08d Add code_arm_required to manual alarm with MQTT (#22641)
* add code_arm_requited to manual-mqtt alarm

* Add fix for alarm front end more-info-alarm_control_panel

* Fix code mistake
2019-06-17 14:49:10 -07:00
cgtobi
2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00