Commit Graph

32 Commits (56942504453a24fdaba2fe47f80c78a8dbbc72b1)

Author SHA1 Message Date
Erik Montnemery b5ce84cd89
Add MQTT button (#59348) 2021-11-09 12:04:14 +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
Maciej Bieniek 0aa06d22f1
Move `configuration_url` abbreviation to MQTT `DEVICE_ABBREVIATIONS` const (#58313) 2021-10-24 11:35:46 +02:00
Franck Nijhof eed9f67402
Add service configuration URL to MQTT (#57731) 2021-10-14 18:27:40 -07:00
Erik Montnemery 7223c59e79
Allow resetting an MQTT number (#57161)
* Allow resetting an MQTT number

* Add abbreviation
2021-10-07 13:54:34 +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
Jan Bouwhuis c9eab10134
Add MQTT humidifier platform integration (#52828)
* New mqtt humidifier platform

* Add humidifier platform

* Leave out humidity step

* Use humidity in constant for payload reset

* change TARGET_HUMIDITY_RESET payload name

* _attr_max_humidity not assigned correctly

* _target_humidity_range has a zero base

* align CONF_TARGET_HUMIDITY_MIN and MAX  with model

* shorter topics for humidity_range

* Converts float to int from template

* new humidifier abbreviations

* Add common module to support tests

* Add tests

* Addtional testing

* Always require target_humidity_command_topic

* Typo

* use available_modes to align entity model

* use avail_modes not modes to avoid conflict

* typo target_humidity_value_template

* Allign modes and templates with climate platform

* mode_state_template

* target_humidity_state_template

* Typo in platform name

* Remove humidity_range feature and common lib

* Update homeassistant/components/mqtt/humidifier.py

Use vol.In, not regex

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

* black

* Update homeassistant/components/mqtt/humidifier.py

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

* Use round to convert float to target humidity

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-07-15 11:12:23 +02:00
Erik Montnemery 4533a77597
Add MQTT select (#52120)
* Add MQTT select

* Fix value_template support

* Lint
2021-06-24 17:09:06 +02:00
Erik Montnemery 52c142a82d
Add support for color_mode white to MQTT light basic schema (#51484)
* Add support for color_mode white to MQTT light basic schema

* Add missing abbreviations
2021-06-22 11:59:20 +02:00
Erik Montnemery 789a14fc44
Add support for last_reset to MQTT sensor (#51036)
* Add support for last_reset to MQTT sensor

* Update abbreviations

* Improve test coverage
2021-05-26 11:50:29 +02:00
Erik Montnemery 870c61a622
Add color_mode support to MQTT light with basic schema (#50464)
* Add color_mode support to MQTT light with basic schema

* Update abbreviations

* Silence pylint

* Improve test coverage

* Apply suggestions from code review
2021-05-24 11:37:02 +02:00
Erik Montnemery dc65f279a7
Add support for state_class to MQTT sensor (#50927) 2021-05-21 17:37:26 +02:00
Shay Levy 6e087039f4
Add min/max/step to MQTT number (#50869) 2021-05-21 18:35:27 +03:00
Jan Bouwhuis 9abf43f95f
Mqtt fan feature for resetting current speed `percentage` or `preset_mode` (#50565)
* Mqtt fan resetting speed percentage or preset_mode

* tests reset payload is working with val templates

* Remove duplicate line for CONF_PAYLOAD_HIGH_SPEED
2021-05-18 08:24:42 +02:00
Erik Montnemery c7584a1f92
Add color_mode support to MQTT JSON light (#47993) 2021-03-31 11:28:45 +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
Jan Bouwhuis d8a4cf63f4
Command template support for MQTT fan (#48413)
* Command template support

* Fix typo in abbreviations

* Update homeassistant/components/mqtt/fan.py

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

* Fix initialize templates

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-03-29 20:41:51 +02:00
Jan Bouwhuis 5b17aaf9d5
Percentage and preset mode support for MQTT fan (#47944)
* git push --all origin

* Fix percentage to ordered list conversion

* Tests for mqtt fan and fixes

* Improve tests and error handling base config

* Additional tests

* Tests completed, small fixes

* Allow preset mode and percentages combined

* Remove raise in setup and update tests

* Alignment with fan entity mode

* Fix pylint for len-as-condition

* Remove python binary cache file from PR

* Additional tests on async_turn_on and fix

* Added comments for deprecation of speeds

* Schema checks before init

* Optimize pre schema checks

* Correct schema checks

* Update homeassistant/components/mqtt/abbreviations.py

Comment speeds for mqtt fan are deprecated not needed here

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

* Update homeassistant/components/mqtt/fan.py

Comment speeds for mqtt fan are deprecated not needed here

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

* Update homeassistant/components/mqtt/fan.py

Comment speeds for mqtt fan are deprecated not needed here

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

* Update homeassistant/components/mqtt/fan.py

Comment speeds for mqtt fan are deprecated not needed here

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

* Update homeassistant/components/mqtt/fan.py

Comment speeds for mqtt fan are deprecated not needed here

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

* Warnings for exceptions - testing speed_range

* Update homeassistant/components/mqtt/abbreviations.py

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

* Update homeassistant/components/mqtt/fan.py

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

* Update homeassistant/components/mqtt/fan.py

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

* Update homeassistant/components/mqtt/fan.py

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

* Update homeassistant/components/mqtt/fan.py

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

* Update homeassistant/components/mqtt/fan.py

* Save with black

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-03-26 08:37:47 +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
Shay Levy 81c88cd639
Enhance MQTT cover platform (#46059)
* Enhance MQTT cover platform

Allow combining of position and state of MQTT cover
Add template and fix optimistic in set tilt position
Add tests

* Add abbreviations

* Add tests and stopped state

* Cleanup & fix range for templates

* Apply suggestions from code review

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-02-08 16:02:12 +01:00
radovanbauer baab9b9a81
Added command templates for the mqtt climate component. (#44976)
This allows integrating with devices which require more complex payloads to be posted when updating their values.

Old feature request: https://github.com/home-assistant/core/issues/11496
There are numerous posts requesting this feature, example: https://community.home-assistant.io/t/need-help-with-value-template-for-mqtt-hvac/73395/68https://community.home-assistant.io/t/need-help-with-value-template-for-mqtt-hvac/73395/68

Command templates have been added for the following:
- fan_mode
- hold
- mode
- swing_mode
- temperature
- temperature high/low

This doesn't add templates for aux, away mode, power since these already accept custom payload_on/off (although they all share the same payload). It should be straightforward to add templates for them as well if needed.
2021-01-26 16:12:33 +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 4b3ad0a1cd
Support multiple MQTT availability topics (#37418)
* Support multiple MQTT availability topics

* Make availability list and availability_topic exclusive

* Make availability list and availability_topic exclusive

* Add missing abbreviation
2020-07-04 17:48:34 +02:00
Pieter Goetschalckx 02a36a9b68
Add min_mireds and max_mireds to MQTT Light (#32613)
* Add min_mireds and max_mireds to MQTT Light

* Add abbreviations for min_mireds and max_mireds

* Add tests for min_mireds and max_mireds
2020-05-10 09:34:48 +02:00
unixko 8c84e47c94
added abbreviation for temperature_unit (#35076)
Added temp_unit for temperature_unit.
2020-05-02 19:59:23 +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 60ae85564e
Add support for MQTT device triggers (#31679)
* Add support for MQTT device triggers

* Fix test, tweaks

* Improve test coverage

* Address review comments, improve tests

* Tidy up exception handling

* Fix abbreviations

* Rewrite to handle update of attached triggers

* Update abbreviation test

* Refactor according to review comments

* Refactor according to review comments

* Improve trigger removal

* Further refactoring
2020-02-18 13:51:10 -08:00
Rick 3718b25bd9
Add opening and closing states to MQTT covers (#31259)
* Added support for the opening and closing states to MQTT covers

* Processed PR feedback on MQTT cover changes

* Add missing MQTT abbreviation to fix failing tests

* Fixed typo in MQTT abbreviations

* Added mqtt set cover position optimistic test
2020-01-30 21:14:46 +01:00
Iulius 1c2618d99a Add separate command and state topics for mqtt lock (#29808)
* Update lock.py

Allow different command and state topic + different command and state values.

* Formatting updated after black run

* TC updated to reflect different state & cmd values

* Abbreviations for lock states added

* additional non-default state test

* whitespaces fixed

* black formatting run
2019-12-31 15:24:09 +01:00
Raman Gupta 4cb984842a Support custom source type for MQTT device tracker (#27838)
* support custom source type for MQTT device tracker

* fix typo

* add abbreviation
2019-10-22 22:26:29 -07:00
Raman Gupta 4e25807b7d Add ability for MQTT device tracker to map non-default topic payloads to zones/states (#27143)
* add ability for MQTT device tracker to map nondefault topic payloads to zones

* update new parameter name and add abbreviation

* support for payload_home, payload_not_home, and payload_custom

* use constants STATE_NOT_HOME and STATE_HOME as defaults

* reference state constants directly

* add empty dict as default for payload_custom

* change parameter name for custom mapping of payloads to non-home zones to be more descriptive

* removed 'payload_other_zones' per ballobs review

* remove abbreviation for 'payload_other_zones'

* add tests for feature
2019-10-17 17:51:27 -07:00
Erik Montnemery e0be4efe3e Add test case to identify missing MQTT configuration abbreviations (#25616)
* Add missing abbreviations

* Move abbreviations to own file, add script to find missing abbreviations

* Move check from script to test case

* Lint

* Rewrite to use pathlib

* Lint
2019-08-06 17:32:15 -07:00