Commit Graph

1074 Commits (93072d8ac5fa34e57eade45ca227ad9800890da8)

Author SHA1 Message Date
GitHub Action c7fc51cfa5 [ci skip] Translation update 2022-11-04 00:29:52 +00:00
Jan Bouwhuis b3403d7fca
Improve MQTT type hints part 3 (#80542)
* Improve typing debug_info

* Improve typing device_automation

* Improve typing device_trigger

* Improve typing fan

* Additional type hints device_trigger

* Set fan type hints to class level

* Cleanup and mypy

* Follow up and missed hint

* Follow up comment
2022-11-03 13:06:53 +01:00
Jan Bouwhuis 203c83b6f0
Use _attr_ in MQTT climate (#81406)
* Use _attr_ in MQTT climate

* Follow up comment

* Do not change code
2022-11-03 10:58:37 +01:00
GitHub Action 7995f0e414 [ci skip] Translation update 2022-11-03 00:28:45 +00:00
Jan Bouwhuis bda7e416c4
Improve MQTT type hints part 2 (#80529)
* Improve typing camera

* Improve typing cover

* b64 encoding can be either bytes or a string.
2022-11-02 20:33:46 +01:00
Jan Bouwhuis b4ad03784f
Improve MQTT type hints part 1 (#80523)
* Improve typing alarm_control_panel

* Improve typing binary_sensor

* Improve typing button

* Add misssed annotation

* Move CONF_EXPIRE_AFTER to _setup_from_config

* Use CALL_BACK type

* Remove assert, improve code style
2022-11-02 20:33:18 +01:00
epenet 9afabc17ae
Use attr in mqtt sensor (#81402) 2022-11-02 19:50:11 +01:00
epenet 442c5ccc06
Use attr in mqtt fan (#81401)
* Use attr in mqtt fan

* Fix is_on
2022-11-02 16:25:18 +01:00
epenet a255546e9d
Use attr in mqtt binary sensor and switch (#81403) 2022-11-02 13:41:14 +01:00
epenet 7a930d7e79
Use attr in mqtt humidifier (#81400) 2022-11-02 13:39:36 +01:00
epenet dd4b843d47
Use attr in mqtt number (#81399) 2022-11-02 13:39:21 +01:00
Jan Bouwhuis db0785827f
Revert "Do not write state if payload is `''`" for MQTT sensor (#81347)
* Revert "Do not write state if payload is ''"

This reverts commit 869c11884e.

* Add test
2022-11-01 16:25:01 +01:00
Maciej Bieniek 509d5fd69d
Lower log level for non-JSON payload in MQTT update (#81348)
Change log level
2022-11-01 15:57:48 +01:00
GitHub Action 0bca9a614c [ci skip] Translation update 2022-11-01 00:33:48 +00:00
GitHub Action 1c7800c224 [ci skip] Translation update 2022-10-30 00:32:36 +00:00
Jan Bouwhuis 591d13bc49
Move MQTT CONF_SCHEMA from light and vacuum to .const (#81152)
Move CONF_SCHEMA to .const
2022-10-29 10:22:59 +02:00
GitHub Action 4b5de420ed [ci skip] Translation update 2022-10-29 00:24:41 +00:00
Jan Bouwhuis bcae6d604e
Improve MQTT type hints part 8 (#81034)
* Improve typing device_tracker discovery

* Improve typing device_tracker yaml

* Add test source_type attribute

* Follow up comment

* Initialize at `__init__` not at class level.

* Use full name for return variable

* Correct import, remove assert

* Use AsyncSeeCallback
2022-10-28 18:20:33 +02:00
Maciej Bieniek 11ea834cbe
Improve MQTT update platform (#81131)
* Allow JSON as state_topic payload

* Add title

* Add release_url

* Add release_summary

* Add entity_picture

* Fix typo

* Add abbreviations
2022-10-28 17:05:43 +02:00
Jan Bouwhuis f10f74a65a
Add default `source_type` for MQTT device_tracker (#81128)
Make sure the source_type is set - default to gps
2022-10-28 10:49:01 +02:00
GitHub Action f399385147 [ci skip] Translation update 2022-10-28 00:30:47 +00:00
Jan Bouwhuis 4da3fb5baa
Correct Import of ReceivePayloadType (#81035) 2022-10-26 20:26:05 +02:00
Jan Bouwhuis 2d9f39d406
Strict typing for shared MQTT modules (#80913)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2022-10-26 13:52:34 +02:00
GitHub Action d0ff6582e6 [ci skip] Translation update 2022-10-26 00:29:57 +00:00
GitHub Action 9b331abe91 [ci skip] Translation update 2022-10-25 00:39:01 +00:00
Jan Bouwhuis 2f11385627
Add typing hints for MQTT mixins (#80702)
* Add typing hints for MQTT mixins

* Follow up comments

* config_entry is always set

* typing discovery_data - substate None assignment

* Rename `config[CONF_DEVICE]` -> specifications
2022-10-24 15:00:37 +02:00
Maciej Bieniek 1f0cb73ad0
Add `update` platform to MQTT integration (#80659) 2022-10-24 11:47:45 +02:00
Jan Bouwhuis 5e7f571f01
Move advanced MQTT options to entry (#79351)
* Move advanced broker settings to entry

* Add repair issue for deprecated settings

* Split CONFIG_SCHEMA

* Do not store certificate UI flags in entry

* Keep entered password in next dialog

* Do not process yaml config in flow

* Correct typo
2022-10-24 09:58:23 +02:00
Jan Bouwhuis 5f27e2fe01
Improve typing hints MQTT __init__ (#80674)
* Improve typing __init__

* Follow up suggestions
2022-10-21 12:25:21 +02:00
epenet 2c43606922
Add websocket type hints in components (#80654)
* Add websocket type hints in components

* Adjust

* Apply suggestion

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2022-10-20 13:41:14 +02:00
Jan Bouwhuis cce4485fb7
Add missed write state request for MQTT cover (#80540)
Missed write state request for MQTT cover
2022-10-20 11:22:30 +02:00
epenet 60640b4436
Add websocket type hints in components (#80533) 2022-10-18 22:15:23 -04:00
GitHub Action 3c48ce9ee7 [ci skip] Translation update 2022-10-16 00:44:12 +00:00
Jan Bouwhuis 65187ab227
Use selectors for basic broker and options for MQTT config flow (#79791)
Use selectors for basic broker en options
2022-10-11 10:51:35 +02:00
Jan Bouwhuis 8aa30cce26
Fix state saving when sharing topics for MQTT entities (#79421)
* Do not write old state sharing availability topic

* Add a test

* Support for all availability topics

* delay async_write_ha_state till last callback

* Process write req after processing callback jobs

* Do not count subscription callbacks

* Simplify

* Stale docsting

* No topic needed for delays state write

* No need to clear when reloading

* Move test to test_mixins.py

* Only set up sensor platform for test
2022-10-11 10:49:54 +02:00
Marc Mueller 4e5b5dfb93
Update pyupgrade to 3.1.0 (#80058)
* Update pyupgrade to 3.1.0

* Remove redundant open modes - text is the default
2022-10-11 09:04:52 +02:00
Jan Bouwhuis 6eb2c96d32
Correct use of ConfigType in MQTT config flow code (#79934)
Correct use of ConfigType
2022-10-09 14:41:30 +02:00
Bert Melis 6546bba233
Process abbreviated availability options in mqtt discovery payload (#79712)
Expand availability in mqtt discovery payload
2022-10-08 15:36:49 +02:00
Jan Bouwhuis aee82e2b3b
De-duplicate MQTT config_flow code (#79369)
* De-duplicate config_flow code

* De duplicate code birth and will
2022-10-07 10:12:19 +02:00
Jan Bouwhuis 9c9c8b324a
Ignore an '' value_template result for MQTT sensor (#79417)
Do not write state if payload is ''
2022-10-01 19:00:54 +03:00
Jan Bouwhuis 84b2c74746
Move MQTT discovery hass.data globals to dataclass (#78706)
* Add MQTT discovery hass.data globals to dataclass

* isort

* Additional rework

* Add hass.data["mqtt_tags"] to dataclass

* Follow-up comment

* Corrections
2022-09-28 14:13:44 +02:00
Jan Bouwhuis c5a58c8501
Fix MQTT setup after changing config entry flow options (#79103)
Fix issues with config flow options
2022-09-27 08:05:28 +02:00
Jan Bouwhuis 7216d4c636
Add debug logging for MQTT templates (#79016) 2022-09-27 00:36:10 +02:00
Jan Bouwhuis bdcece4904
Fix MQTT device_tracker generating unique id-s - regression on #78547 (#79033) 2022-09-24 22:03:03 -04:00
Jan Bouwhuis 81514b0d1c
Move MQTT debug_info to dataclass (#78788)
* Add MQTT debug_info to dataclass

* Remove total attr, assign factory

* Rename typed dict to MqttDebugInfo and use helper

* Split entity and trigger debug info

* Refactor

* More rework
2022-09-23 20:55:29 +02:00
epenet e58531f118
Add MqttData helper to mqtt (#78825)
* Add MqttData helper to mqtt

* Adjust client for circular dependencies

* Move MqttData to models.py

* Move get_mqtt_data to util.py
2022-09-20 19:40:06 +02:00
Jan Bouwhuis 354411feed
Link manually added MQTT entities the the MQTT config entry (#78547)
Co-authored-by: Erik <erik@montnemery.com>
2022-09-18 12:55:31 -04:00
GitHub Action e9eb5dc338 [ci skip] Translation update 2022-09-18 00:29:50 +00:00
Jan Bouwhuis 1f410e884a
Make hass.data["mqtt"] an instance of a DataClass (#77972)
* Use dataclass to reference hass.data globals

* Add discovery_registry_hooks to dataclass

* Move discovery registry hooks to dataclass

* Add device triggers to dataclass

* Cleanup DEVICE_TRIGGERS const

* Add last_discovery to data_class

* Simplify typing for class `Subscription`

* Follow up on comment

* Redo suggested typing change to sasisfy mypy

* Restore typing

* Add mypy version to CI check logging

* revert changes to ci.yaml

* Add docstr for protocol

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

* Mypy update after merging #78399

* Remove mypy ignore

* Correct return type

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2022-09-17 21:43:42 +02:00
GitHub Action ec258410c5 [ci skip] Translation update 2022-09-16 00:29:29 +00:00