Commit graph

55 commits

Author SHA1 Message Date
Jan Bouwhuis
e8664ce1ae
Move manual configuration of MQTT climate to the integration key ()
Add climate

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-22 11:28:10 +02:00
epenet
1be2438ef6
Use climate enums in mqtt () 2022-05-09 08:15:11 +02:00
Franck Nijhof
bfc82b030f
Replace Climate CURRENT_HVAC_* constants with HVACAction enum () 2022-04-20 13:41:05 -07:00
Franck Nijhof
a22f36178f
Replace Climate HVAC_MODE_* constants with HVACMode enum ()
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-04-20 13:20:53 +02:00
Jan Bouwhuis
98adeb6070
Fix false positive MQTT climate deprecation warnings for defaults ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-03-07 15:38:33 +01:00
Jan Bouwhuis
83846bb5cc
MQTT climate preset_modes rework ()
* MQTT climate preset_modes rework

* Set deprection date to 2022.9 (6 months)

* add valid_preset_mode_configuration for discovery

* Update deprecation date
2022-02-17 13:51:35 +01:00
Erik Montnemery
fe38e6ba87
Drop MQTT import flow ()
* 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 () 2022-02-04 17:35:32 +01:00
Jan Bouwhuis
0cabf3e577
Fix MQTT climate action null warnings () 2022-01-27 08:41:27 +01:00
Jan Bouwhuis
aa73e5bd72
Fix MQTT climate optimistic preset modes ()
* Always publish when preset_mode is set

* Revert "Fixed isort error"

This reverts commit 1a3c5e6460.

* isort
2022-01-11 17:08:26 +01:00
Jan Bouwhuis
dd0193052c
Add MQTT encoding parameter for all subscribed topics ()
* 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
061ce0c187
Fix mqtt reloading and rework tests ()
* Improve mqtt reloading/tests and fix issues

* Cleanup fixture for reloading test

* isort and black remove replaced test_reloadable
2022-01-03 15:14:50 +01:00
Jan Bouwhuis
d0c4f0fec4
Add mqtt encoding support for publishing ()
* 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
Till Skrodzki
635d875b1d
Only accept valid hvac actions sent via mqtt ()
* Only accept valid hvac actions sent via mqtt

* Only accept valid hvac actions sent via mqtt

* Fix existing action test and remove old one

* Remote None as valid hvac action being accepted

* Change loglevel of wrong hvac action received
2021-11-25 15:53:34 +01:00
Erik Montnemery
640a7fee9d
Allow extra keys in MQTT discovery messages ()
* Allow extra keys in MQTT discovery messages

* Remove extra keys
2021-10-25 13:47:06 +02:00
Erik Montnemery
040c88f982
Filter MQTT climate JSON attributes () 2021-06-29 11:13:58 +02:00
radovanbauer
baab9b9a81
Added command templates for the mqtt climate component. ()
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
Franck Nijhof
65cf2fcb6f
Drop asynctest () 2021-01-01 22:31:56 +01:00
Philip Allgaier
18736dbebf
Bump voluptuous to 0.12.1 ()
* Bump voluptuous to 0.12.1

* Adjust MQTT climate test to new error msg
2020-12-07 02:49:36 +01:00
Erik Montnemery
52e1282d8c
Make MQTT climate return PRESET_NONE when no preset is set () 2020-11-16 20:10:55 +01:00
Paulus Schoutsen
6380ebd1eb
Fix MQTT publish from a script with templates () 2020-10-26 16:46:26 +01:00
Erik Montnemery
4ed1f8023b
Suppress MQTT discovery updates without changes () 2020-08-06 10:43:47 +02:00
Erik Montnemery
4e77969f5e
Drop use of mock_mqtt_component ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-06-23 10:17:22 -07:00
Erik Montnemery
280f49540e
Drop use of async_mock_mqtt_component () 2020-06-22 23:59:50 +02:00
definitio
ad5101c5c0
Set state for MQTT entities to 'unavailable' when no connection to broker ()
* Report 'unavailable' state when not connected

to MQTT broker

* Fix tests

* Rewrite to remove the polling

* Add tests

* Add some fixes
2020-06-07 09:21:16 +02:00
Paulus Schoutsen
276f3afb00
Do async_setup_platform in background ()
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-31 22:18:30 -07:00
Erik Montnemery
f1ecac92df
Fail tests if wrapped callbacks or coroutines throw () 2020-05-06 14:14:57 -07:00
Paulus Schoutsen
2af984917e
Use asynctest-mock in most places ()
* Use asynctest-mock in most places

* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
presslab-us
e41753556c
Add MQTT climate temperature unit ()
* Add MQTT temperature unit
2020-04-15 20:11:04 +02:00
Erik Montnemery
4e6fd19624
Improve MQTT test coverage and remove dead code ()
* Improve MQTT tests and remove dead code

* Remove useless test.

* Add more test
2020-04-03 09:05:58 -07:00
Erik Montnemery
fbd197146a
Add MQTT debug info for remaining MQTT integrations () 2020-04-01 11:48:32 -07:00
Erik Montnemery
9508c51403
Fix change of entity_id for discovered MQTT entities () 2020-03-30 14:26:59 -07:00
Erik Montnemery
86d48c608e
Deduplicate MQTT tests () 2020-03-17 02:09:19 -05:00
Erik Montnemery
8bc542776b
Cleanup entity and device registry on MQTT discovery removal ()
* Cleanup entity and device registry on MQTT discovery removal.

* Review comments
2020-03-11 18:00:47 -07:00
Erik Montnemery
f7ddbc7e1e
Remove duplicated config from MQTT tests () 2020-03-11 09:34:19 -07:00
Erik Montnemery
4bb9f1800d
Deduplicate MQTT mixin tests ()
* Deduplicate MQTT mixin tests

* Remove test of not yet merged function
2020-03-09 09:40:00 -07:00
Ville Skyttä
e6388e186c
Remove unnecessary string literal concatenations () 2020-01-02 21:17:10 +02:00
Bas Nijholt
ce5072fc91 use isort to sort imports according to PEP8 for mqtt () 2019-12-08 22:45:26 +05:30
Dmitry Krasnoukhov
4881bc04d8 Allow to change MQTT climate hold mode () 2019-11-25 20:53:37 -08:00
Kevin Köck
b7153ca207 Add mqtt temp_low/high_template in SCHEMA_BASE ()
* fix missing temp_low/high_template in SCHEMA_BASE

* temperature_high/low_state_template test

* Update test_climate.py

* paste error

* Update test_climate.py

* Update test_climate.py

* Update test_climate.py

* Update test_climate.py
2019-11-06 07:50:54 -05:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Paulus Schoutsen
50d4921d0a
Introduce PRESET_NONE for climate ()
* Introduce PRESET_NONE for climate

* Require preset mode to be a string

* Lint

* Fix tests
2019-07-21 11:00:42 -07:00
Philip Rosenberg-Watt
1c6d55e51b Add MQTT climate precision ()
* Add MQTT climate precision

* Remove stale code
2019-07-18 15:21:50 -07:00
definitio
93970b5621 Add hvac_action support for MQTT HVAC ()
* Add hvac_action support

* Add tests
2019-07-18 10:17:26 -07:00
Pascal Vizeli
84cf76ba36
Climate 1.0 ()
* Climate 1.0 / part 1/2/3

* fix flake

* Lint

* Update Google Assistant

* ambiclimate to climate 1.0 ()

* Fix Alexa

* Lint

* Migrate zhong_hong

* Migrate tuya

* Migrate honeywell to new climate schema ()

* Update one

* Fix model climate v2

* Cleanup p4

* Add comfort hold mode

* Fix old code

* Update homeassistant/components/climate/__init__.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/climate/const.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* First renaming

* Rename operation to hvac for paulus

* Rename hold mode to preset mode

* Cleanup & update comments

* Remove on/off

* Fix supported feature count

* Update services

* Update demo

* Fix tests & use current_hvac

* Update comment

* Fix tests & add typing

* Add more typing

* Update modes

* Fix tests

* Cleanup low/high with range

* Update homematic part 1

* Finish homematic

* Fix lint

* fix hm mapping

* Support simple devices

* convert lcn

* migrate oem

* Fix xs1

* update hive

* update mil

* Update toon

* migrate deconz

* cleanup

* update tesla

* Fix lint

* Fix vera

* Migrate zwave

* Migrate velbus

* Cleanup humity feature

* Cleanup

* Migrate wink

* migrate dyson

* Fix current hvac

* Renaming

* Fix lint

* Migrate tfiac

* migrate tado

* Fix PRESET can be None

* apply PR#23913 from dev

* remove EU component, etc.

* remove EU component, etc.

* ready to test now

* de-linted

* some tweaks

* de-lint

* better handling of edge cases

* delint

* fix set_mode typos

* apply PR#23913 from dev

* remove EU component, etc.

* ready to test now

* de-linted

* some tweaks

* de-lint

* better handling of edge cases

* delint

* fix set_mode typos

* delint, move debug code

* away preset now working

* code tidy-up

* code tidy-up 2

* code tidy-up 3

* address issues , 

* address issues ,  - 2/2

* refactor MODE_AUTO to MODE_HEAT_COOL and use F not C

* add low/high to set_temp

* add low/high to set_temp 2

* add low/high to set_temp - delint

* run HA scripts

* port changes from PR 

* manual rebase

* manual rebase 2

* delint

* minor change

* remove SUPPORT_HVAC_ACTION

* Migrate radiotherm

* Convert touchline

* Migrate flexit

* Migrate nuheat

* Migrate maxcube

* Fix names maxcube const

* Migrate proliphix

* Migrate heatmiser

* Migrate fritzbox

* Migrate opentherm_gw

* Migrate venstar

* Migrate daikin

* Migrate modbus

* Fix elif

* Migrate Homematic IP Cloud to climate-1.0 ()

* hmip climate fix

* Update hvac_mode and preset_mode

* fix lint

* Fix lint

* Migrate generic_thermostat

* Migrate incomfort to new climate schema ()

* initial commit

* Update climate.py

* Migrate eq3btsmart

* Lint

* cleanup PRESET_MANUAL

* Migrate ecobee

* No conditional features

* KNX: Migrate climate component to new climate platform ()

* Migrate climate component

* Remove unused code

* Corrected line length

* Lint

* Lint

* fix tests

* Fix value

* Migrate geniushub to new climate schema ()

* Update one

* Fix model climate v2

* Cleanup p4

* Add comfort hold mode

* Fix old code

* Update homeassistant/components/climate/__init__.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/climate/const.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* First renaming

* Rename operation to hvac for paulus

* Rename hold mode to preset mode

* Cleanup & update comments

* Remove on/off

* Fix supported feature count

* Update services

* Update demo

* Fix tests & use current_hvac

* Update comment

* Fix tests & add typing

* Add more typing

* Update modes

* Fix tests

* Cleanup low/high with range

* Update homematic part 1

* Finish homematic

* Fix lint

* fix hm mapping

* Support simple devices

* convert lcn

* migrate oem

* Fix xs1

* update hive

* update mil

* Update toon

* migrate deconz

* cleanup

* update tesla

* Fix lint

* Fix vera

* Migrate zwave

* Migrate velbus

* Cleanup humity feature

* Cleanup

* Migrate wink

* migrate dyson

* Fix current hvac

* Renaming

* Fix lint

* Migrate tfiac

* migrate tado

* delinted

* delinted

* use latest client

* clean up mappings

* clean up mappings

* add duration to set_temperature

* add duration to set_temperature

* manual rebase

* tweak

* fix regression

* small fix

* fix rebase mixup

* address comments

* finish refactor

* fix regression

* tweak type hints

* delint

* manual rebase

* WIP: Fixes for honeywell migration to climate-1.0 ()

* add type hints

* code tidy-up

* Fixes for incomfort migration to climate-1.0 ()

* delint type hints

* no async unless await

* revert: no async unless await

* revert: no async unless await 2

* delint

* fix typo

* Fix homekit_controller on climate-1.0 ()

* Fix tests on climate-1.0 branch

* As part of climate-1.0, make state return the heating-cooling.current characteristic

* Fixes from review

* lint

* Fix imports

* Migrate stibel_eltron

* Fix lint

* Migrate coolmaster to climate 1.0 ()

* Migrate coolmaster to climate 1.0

* fix lint errors

* More lint fixes

* Fix demo to work with UI

* Migrate spider

* Demo update

* Updated frontend to 20190705.0

* Fix boost mode ()

* Prepare Netatmo for climate 1.0 ()

* Migration Netatmo

* Address comments

* Update climate.py

* Migrate ephember

* Migrate Sensibo

* Implemented review comments ()

* Migrate ESPHome

* Migrate MQTT

* Migrate Nest

* Migrate melissa

* Initial/partial migration of ST

* Migrate ST

* Remove Away mode ()

* Migrate evohome, cache access tokens ()

* add water_heater, add storage - initial commit

* add water_heater, add storage - initial commit

delint

add missing code

desiderata

update honeywell client library & CODEOWNER

add auth_tokens code, refactor & delint

refactor for broker

delint

* Add Broker, Water Heater & Refactor

add missing code

desiderata

* update honeywell client library & CODEOWNER

add auth_tokens code, refactor & delint

refactor for broker

* bugfix - loc_idx may not be 0

more refactor - ensure pure async

more refactoring

appears all r/o attributes are working

tweak precsion, DHW & delint

remove unused code

remove unused code 2

remove unused code, refactor _save_auth_tokens()

* support RoundThermostat

bugfix opmode, switch to util.dt, add until=1h

revert breaking change

* store at_expires as naive UTC

remove debug code

delint

tidy up exception handling

delint

add water_heater, add storage - initial commit

delint

add missing code

desiderata

update honeywell client library & CODEOWNER

add auth_tokens code, refactor & delint

refactor for broker

add water_heater, add storage - initial commit

delint

add missing code

desiderata

update honeywell client library & CODEOWNER

add auth_tokens code, refactor & delint

refactor for broker

delint

bugfix - loc_idx may not be 0

more refactor - ensure pure async

more refactoring

appears all r/o attributes are working

tweak precsion, DHW & delint

remove unused code

remove unused code 2

remove unused code, refactor _save_auth_tokens()

support RoundThermostat

bugfix opmode, switch to util.dt, add until=1h

revert breaking change

store at_expires as naive UTC

remove debug code

delint

tidy up exception handling

delint

* update CODEOWNERS

* fix regression

* fix requirements

* migrate to climate-1.0

* tweaking

* de-lint

* TCS working? & delint

* tweaking

* TCS code finalised

* remove available() logic

* refactor _switchpoints()

* tidy up switchpoint code

* tweak

* teaking device_state_attributes

* some refactoring

* move PRESET_CUSTOM back to evohome

* move CONF_ACCESS_TOKEN_EXPIRES CONF_REFRESH_TOKEN back to evohome

* refactor SP code and dt conversion

* delinted

* delinted

* remove water_heater

* fix regression

* Migrate homekit

* Cleanup away mode

* Fix tests

* add helpers

* fix tests melissa

* Fix nehueat

* fix zwave

* add more tests

* fix deconz

* Fix climate test emulate_hue

* fix tests

* fix dyson tests

* fix demo with new layout

* fix honeywell

* Switch homekit_controller to use HVAC_MODE_HEAT_COOL instead of HVAC_MODE_AUTO ()

* Lint

* PyLint

* Pylint

* fix fritzbox tests

* Fix google

* Fix all tests

* Fix lint

* Fix auto for homekit like controler

* Fix lint

* fix lint
2019-07-08 14:00:24 +02:00
Erik Montnemery
5376e15286 Convert some test helpers to coroutines and adjust tests ()
* Convert some test helpers to coroutines

* Fix tests
2019-04-25 10:14:16 +02:00
Erik Montnemery
a89c7f8feb Improve MQTT tests ()
* Improve MQTT tests

* Tweak
2019-04-22 08:48:50 -04:00
Erik Montnemery
557211240e Drop unnecessary block_till_done, improve tests () 2019-04-19 14:08:54 -07:00
Otto Winter
c9ec166f4b Add MQTT climate two-point target temperature support ()
* Add MQTT climate two-point target temperature support

* Sort

* Fix test
2019-04-08 06:28:42 -07:00
Joakim Plate
c5de32e7b1 Climate const.py move ()
* Move constants to const.py

* Import from const instead of climate
2019-02-14 20:34:43 +01:00