Jan Bouwhuis
5fbe36d43e
Fix MQTT test logging level after default pytest logging capture change ( #84773 )
...
Fix logging level for MQTT CI testing after #84672
2022-12-29 15:08:35 +01:00
Jonathan de Jong
b67009dee3
Allow MQTT device trackers to be able to the reset the location name for auto zone inference ( #83952 )
...
* adds auto-zone to mqtt device trackers
* black formatting
* abbr
* change abbreviation
* add test
* fade to black
* Modify custom overrides
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
* add custom + abbr payload and fix test docstrings
* change auto_zone to reset
* change RST to None, address isort
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2022-12-20 17:38:40 +01:00
Jan Bouwhuis
7ed1d4988b
Add QoS parameter to MQTT websocket_subscribe ( #83241 )
2022-12-06 09:31:19 +01:00
Joe Rogers
f1ee920463
Handle numeric versions in mqtt update ( #83218 )
...
* Handle numeric versions in mqtt update
* Remove need for type:ignore
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2022-12-04 21:52:48 +01:00
Jan Bouwhuis
de77132a5a
Add the QoS in the MQTT debug log ( #83195 )
...
Logging the MQTT QoS in the debug log
2022-12-04 15:03:41 +01:00
Jan Bouwhuis
2785b2b52f
Add mqtt text platform ( #82884 )
2022-11-29 20:31:05 +01:00
Jan Bouwhuis
4335b0db25
Clean up or correct from removed deprecation for MQTT platform ( #82684 )
...
Clean up or correct from removed deprecation
2022-11-25 16:11:22 +01:00
Jan Bouwhuis
01b0f4d565
Announce a deprecated callback for MQTT subscribe will stop working ( #82610 )
...
* Announce a deprecated callback will stop working
* Use 2 months grace period
* Use 2 months grace period
* Use 2 months grace period
* Add deprecation comment to tests
2022-11-25 10:22:12 +01:00
epenet
f91e250e90
Fix TemplateError definition ( #82570 )
2022-11-23 20:30:32 +01:00
Jan Bouwhuis
4f3919cb95
Move mqtt device_tracker files ( #82581 )
...
Move mqtt device_tracker files to single file
2022-11-23 16:24:56 +01:00
Jan Bouwhuis
32d68f375b
Add Mqtt WebSockets support ( #82078 )
...
* Add Mqtt WebSockets support
* Fix tests
* Add testing websockets options
* Add tests transport settings
* Do not use templates for ws_headers
* Use json helper - small corrections
2022-11-23 15:03:31 +01:00
Aarni Koskela
e4c73259f7
Configure autoflake for pre-commit ( #82414 )
2022-11-22 08:10:36 +01:00
Jan Bouwhuis
7c2e7863d2
Remove legacy YAML support from MQTT ( #82102 )
2022-11-17 22:55:31 +01:00
Jan Bouwhuis
b717da879f
Add support for Mqtt protocol version 5 ( #82260 )
2022-11-17 21:12:27 +01:00
Jan Bouwhuis
f60850586e
Remove `b64` encoding work-a-round for MQTT camera ( #82244 )
2022-11-17 10:11:25 +01:00
Jan Bouwhuis
7932864e00
Always update attributes on an update for MQTT update ( #82139 )
2022-11-15 18:43:01 +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
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
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
Martin Hjelmare
62c4cd3c26
Add name and slug to supervisor discovery info ( #80094 )
2022-10-11 16:56:45 +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
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
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
J. Nick Koston
75104159c6
Fix mqtt tests ( #79079 )
2022-09-25 20:07:50 -10: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
0d696b84b2
Cleanup root component imports in tests ( #78893 )
2022-09-21 06:57:41 -10:00
epenet
7bc2712142
Adjust root-import in tests ( #78761 )
...
* Adjust root-import in tests
* Adjust diagnostics
* Adjust button
* Adjust select
* Adjust device_tracker
* Adjust camera
* Adjust humidifier
* Adjust media_source
* Adjust update
* Adjust siren
* Adjust number
* Adjust alarm_control_panel
* Adjust notify
* Adjust sensor
* Adjust switch
* Revert anthemav
* Don't adjust demo humidifier
2022-09-19 15:22:23 +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
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
Jan Bouwhuis
fb67123d77
Clear MQTT discovery topic when a disabled entity is removed ( #77757 )
...
* Cleanup discovery on entity removal
* Add test
* Cleanup and test
* Test with clearing payload not unique id
* Address comments
* Tests cover and typing
* Just pass hass
* reuse code
* Follow up comments revert changes to cover tests
* Add test unique_id has priority over disabled
* Update homeassistant/components/mqtt/__init__.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-09-09 15:24:26 +02:00
Jan Bouwhuis
9a4c8f5f0e
Refactor common MQTT tests to use modern schema ( #77583 )
...
* Common tests availability
* Common tests attributes
* Common tests unique id
* Common tests discovery
* Common tests encoding
* Common tests device info
* Common tests entity_id updated
* Common tests entity debug info
* Common test entity category
* Common tests setup reload unload+corrections
* Cleanup sweep
* Comments from curent change
* Cleanup
* Remove unused legacy config
2022-09-09 11:15:48 +02:00
Erik Montnemery
b21f8c9ea8
Remove use of deprecated SUPPORT_* constants from MQTT light ( #77828 )
...
* Remove use of deprecated SUPPORT_* constants from MQTT light
* Refactor
2022-09-08 11:21:46 +02:00
Jan Bouwhuis
13188a5c63
Refactor MQTT tests to use modern platform schema part 2 ( #77525 )
...
* Tests light json
* Tests light template
* Missed test light json
* Tests light
* Tests lock
* Tests number
* Tests scene
* Tests select
* Tests sensor
* Tests siren
* Tests state vacuuum
* Tests switch
* Derive DEFAULT_CONFIG_LEGACY from DEFAULT_CONFIG
* Suggested comment changes
2022-09-06 11:03:02 +02:00
Jan Bouwhuis
a4792998a2
Refactor MQTT tests to use modern platform schema part 1 ( #77387 )
...
* Tests alarm_control_panel
* Tests binary_sensor
* Tests button
* Tests camera
* Tests Climate + corrections default config
* Tests cover
* Tests device_tracker
* Tests fan
* Tests humidifier
* Fix test_supported_features test fan
* Tests init
* Tests legacy vacuum
* Derive DEFAULT_CONFIG_LEGACY from DEFAULT_CONFIG
* Commit suggestion comment changes
2022-09-06 11:02:15 +02:00
Jan Bouwhuis
a3e6abd396
Use hass.config_entries.async_setup in mqtt test ( #77750 )
...
* Use hass.config_entries.async_setup
* The setup is awaited hence waiting is not needed
2022-09-03 15:44:50 +02:00
Jan Bouwhuis
2e34814d7a
Fix reload of MQTT config entries ( #76089 )
...
* Wait for unsubscribes
* Spelling comment
* Remove notify_all() during _register_mid()
* Update homeassistant/components/mqtt/client.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Correct handling reload manual set up MQTT items
* Save and restore device trigger subscriptions
* Clarify we are storing all remaining subscriptions
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-09-02 18:54:20 +02:00
Erik Montnemery
14717951c3
Support configuring the mode of MQTT number entities ( #77478 )
...
* Support configuring the mode of MQTT number entities
* Use modern schema for tests
Co-authored-by: jbouwh <jan@jbsoft.nl>
2022-08-30 12:47:35 +02:00
Franck Nijhof
5f0cca9b26
Raise repairs issue if automation calls unknown service ( #76949 )
2022-08-25 20:56:26 -04:00
Maciej Bieniek
ad6beac535
Add `hw_version` to MQTT device info ( #77210 )
...
* Add hw_version
* Add abbreviation for hw_version
* Update tests
* Update discovery tests
2022-08-25 11:55:33 +02:00
Erik Montnemery
c55505b47b
Use mock_restore_cache in mqtt tests ( #77297 )
2022-08-25 09:27:38 +02:00
Jan Bouwhuis
be2366d773
Add `this` object to MQTT templates ( #77142 )
...
* Add `this` object to MQTT templates
* Only set once, remove hass guard
* Set once if there is a state
* Add tests TemplateStateFromEntityId calls once
2022-08-23 08:43:07 +02:00
Erik Montnemery
60c8d95a77
Remove white_value support from light ( #76926 )
2022-08-18 08:21:05 -04:00
Erik Montnemery
4cc1428eea
Add support for color_mode white to MQTT JSON light ( #76918 )
2022-08-17 13:07:50 +02:00
Erik Montnemery
73001e29ff
Remove deprecated white_value support from MQTT light ( #76848 )
...
* Remove deprecated white_value support from MQTT light
* Remove deprecated white_value support from MQTT JSON light
* Remove deprecated white_value support from MQTT template light
2022-08-16 16:47:21 +02:00
Jan Bouwhuis
161e533c5f
Remove MQTT climate support for hold and away modes ( #76299 )
...
Remove support for hold and away modes
2022-08-15 08:27:37 +02:00
Jan Bouwhuis
f72cfef7be
Fix MQTT camera encoding ( #76124 )
...
* Fix MQTT camera encoding
* Reduce code
* Add test for using image_encoding parameter
* Move deprecation check to validation
* Dependency
* Set correct strings and log warning
* Rename constant
* Use better issue string identifier
* Revert unwanted change to hassio test
* Avoid term `deprecated` in issue description
* Revert changes using the repairs API
* Add a notice when work-a-round will be removed
* Update homeassistant/components/mqtt/camera.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-08-15 08:26:17 +02:00
Jan Bouwhuis
741efb89d5
Remove deprecated `send_if_off` option for MQTT climate ( #76293 )
...
* Remove `send_if_off` option for mqtt climate
* Use cv.remove()
2022-08-05 13:17:46 +02:00
uvjustin
9ad273a59f
Fix entity typo ( #75767 )
2022-07-26 16:27:16 +02:00
Erik Montnemery
9d0a252ca7
Improve handling of MQTT config entry data ( #72691 )
...
* Improve handling of MQTT config entry data
* Add test
* Add warning
* Adjust tests
2022-07-22 13:36:43 +02:00
Jan Bouwhuis
5ef92e5e95
Fix MQTT race awaiting an ACK when disconnecting ( #75117 )
...
Co-authored-by: Erik <erik@montnemery.com>
2022-07-20 11:58:54 +02:00
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
Franck Nijhof
7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum ( #74642 )
2022-07-07 19:57:36 +03:00
epenet
8ef87205f9
Improve type hints in mqtt ( #74247 )
2022-06-30 21:11:45 +02:00
J. Nick Koston
2742bf86e3
Switch mqtt to use json helper ( #73871 )
...
* Switch mqtt to use json helper
* whitespace
2022-06-23 14:29:09 +02:00
J. Nick Koston
19b2b33037
Speed up subscribing to mqtt topics on connect ( #73685 )
...
* Speed up subscribing to mqtt topics
* update tests
* Remove extra function wrapper
* Recover debug logging for subscriptions
* Small changes and test
* Update homeassistant/components/mqtt/client.py
* Update client.py
Co-authored-by: jbouwh <jan@jbsoft.nl>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-06-22 16:03:18 +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
dea8041461
Add device_class to MQTT number and migrate to native_value ( #73534 )
2022-06-16 13:34:54 +02:00
J. Nick Koston
51b4d15c8c
Speed up mqtt tests ( #73423 )
...
Co-authored-by: jbouwh <jan@jbsoft.nl>
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2022-06-13 10:17:10 -10:00
Jan Bouwhuis
657e7f9a4c
Simplify MQTT test for setup manual mqtt item from yaml ( #72916 )
...
simplify test setup manual mqtt item from yaml
2022-06-13 13:44:12 +02:00
Jan Bouwhuis
48e3d68b53
Clean up MQTT platform entry setup at discovery ( #72371 )
...
* Setup MQTT discovery with entry setup
* Wait for entry setup in test
* flake
2022-06-13 13:38:53 +02:00
Erik Montnemery
3d78240cee
Fix initial tilt value of MQTT cover ( #73308 )
2022-06-10 11:11:40 +02:00
Erik Montnemery
b97d346df7
Fix reload of MQTT yaml config ( #72901 )
2022-06-02 11:32:31 -07:00
Jan Bouwhuis
52561ce076
Update MQTT tests to use the config entry setup ( #72373 )
...
* New testframework and tests for fan platform
* Merge test_common_new to test_common
* Add alarm_control_panel
* Add binary_sensor
* Add button
* Add camera
* Add climate
* Add config_flow
* Add cover
* Add device_tracker_disovery
* Add device_trigger
* Add diagnostics
* Add discovery
* Add humidifier
* Add init
* Add lecacy_vacuum
* Add light_json
* Add light_template
* Add light
* Add lock
* Add number
* Add scene
* Add select
* Add sensor
* Add siren
* Add state_vacuum
* Add subscription
* Add switch
* Add tag
* Add trigger
* Add missed tests
* Add another missed test
* Add device_tracker
* Remove commented out code
* Correct tests according comments
* Improve mqtt_mock_entry and recover tests
* Split fixtures with and without yaml setup
* Update fixtures manual_mqtt
* Update fixtures mqtt_json
* Fix test tasmota
* Update fixture mqtt_room
* Revert fixture changes, improve test
* re-add test
2022-06-02 14:24:46 +02: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
Erik Montnemery
84243cf560
Tweak MQTT hassio discovery flow ( #72699 )
2022-05-30 14:25:36 +02:00
Erik Montnemery
342ccb5bf1
Improve handling of MQTT overridden settings ( #72698 )
...
* Improve handling of MQTT overridden settings
* Don't warn unless config entry overrides yaml
2022-05-30 14:21:20 +02:00
Jan Bouwhuis
d092861926
Move manual configuration of MQTT device_tracker to the integration key ( #72493 )
2022-05-26 13:02:39 -07:00
Jan Bouwhuis
d0556e6dd1
Move manual configuration of MQTT sensor to the integration key ( #72276 )
...
Add sensor
2022-05-23 16:29:45 +02:00
Jan Bouwhuis
bc6451bd64
Move manual configuration of MQTT select to the integration key ( #72274 )
...
Add select
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-23 10:08:44 +02:00
Jan Bouwhuis
673f43fbec
Move manual configuration of MQTT scene to the integration key ( #72273 )
...
Add scene
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-23 09:04:03 +02:00
Jan Bouwhuis
c4893f96f6
Move manual configuration of MQTT siren to the integration key ( #72278 )
...
Add siren
2022-05-23 08:08:08 +02:00
Jan Bouwhuis
623abb1147
Move manual configuration of MQTT number to the integration key ( #72272 )
...
Add number
2022-05-23 08:03:09 +02:00
Jan Bouwhuis
4153edbcdd
Move manual configuration of MQTT humidifier to the integration key ( #72270 )
...
Add humidifier
2022-05-22 13:07:49 +02:00
Jan Bouwhuis
3c3e394972
Move manual configuration of MQTT cover to the integration key ( #72268 )
...
Add cover
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-22 13:07:14 +02:00
Jan Bouwhuis
87d895929f
Move manual configuration of MQTT switch to the integration key ( #72279 )
...
Add switch
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-22 13:06:49 +02:00
Jan Bouwhuis
e8664ce1ae
Move manual configuration of MQTT climate to the integration key ( #72251 )
...
Add climate
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-22 11:28:10 +02:00
Jan Bouwhuis
d1afbbfb09
Move manual configuration of MQTT vacuum to the integration key ( #72281 )
...
Add vacuum
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-22 11:27:25 +02:00
Jan Bouwhuis
17669a728c
Move manual configuration of MQTT lock to the integration key ( #72271 )
...
Add lock
2022-05-21 19:07:26 +02:00
Jan Bouwhuis
809808dd80
Move manual configuration of MQTT camera to the integration key ( #72249 )
...
Add camera
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-21 19:04:36 +02:00
Jan Bouwhuis
17588c39a4
Move manual configuration of MQTT binary_sensor to the integration key ( #72183 )
...
Add binary_sensor
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-21 16:14:24 +02:00
Jan Bouwhuis
3918059033
Move manual configuration of MQTT button to the integration key ( #72167 )
...
Add button
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-21 09:54:51 +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
Jan Bouwhuis
ed1c2ea2b8
Move manual configuration of MQTT fan and light to the integration key ( #71676 )
...
* Processing yaml config through entry setup
* Setup all platforms
* Update homeassistant/components/mqtt/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* adjust mock_mqtt - reference config from cache
* Fix test config entry override
* Add tests yaml setup
* additional tests
* Introduce PLATFORM_SCHEMA_MODERN
* recover temporary MQTT_BASE_PLATFORM_SCHEMA
* Allow extra key in light base schema, restore test
* Fix test for exception on platform key
* One deprecation message per platform
* Remove deprecation checks from modern schema
* 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/light/__init__.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/mqtt/light/__init__.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/mqtt/light/schema_json.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/mqtt/light/schema_template.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/mqtt/mixins.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* rename validate_modern_schema
* Do not fail platform if a single config is broken
* Update homeassistant/components/mqtt/__init__.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Fix tests on asserting log
* Update log. Make helper transparant, remove patch
* Perform parallel processing
* Update tests/components/mqtt/test_init.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Apply suggestions from code review
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/mqtt/mixins.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* black
* Fix tests and add #new_format anchor
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-19 15:04:53 +02:00
TheHolyRoger
0fcdca2d71
Add optional base64 decoding of mqtt camera image ( #71223 )
...
Add unittest for b64 decoding of camera, fix linting
2022-05-09 21:40:15 +02:00
epenet
141688e210
Cleanup ServiceInfo compatibility ( #60540 )
...
Co-authored-by: epenet <epenet@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-05-09 14:17:48 +02:00
Jan Bouwhuis
5d9dc8252b
Use helper for testing an event change ( #71579 )
2022-05-09 11:52:08 +02:00
epenet
1be2438ef6
Use climate enums in mqtt ( #70696 )
2022-05-09 08:15:11 +02:00
Erik Montnemery
e9abfad361
Reject MQTT topics which include control- or non-characters ( #71263 )
2022-05-03 12:19:43 -07:00
epenet
a8a7359c6f
Use VacuumEntityFeature in mqtt ( #70570 )
...
* Use VacuumEntityFeature in mqtt
* Fix tests
2022-04-25 11:34:06 +02:00
Erik Montnemery
5e50a8abd5
Mark device triggers from hidden or auxiliary entities as secondary ( #70335 )
...
* Mark device triggers from hidden or auxiliary entities as secondary
* Update tests
2022-04-21 08:01:32 +02:00
Franck Nijhof
bfc82b030f
Replace Climate CURRENT_HVAC_* constants with HVACAction enum ( #70319 )
2022-04-20 13:41:05 -07:00
Franck Nijhof
a22f36178f
Replace Climate HVAC_MODE_* constants with HVACMode enum ( #70286 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-04-20 13:20:53 +02:00
Franck Nijhof
1e4aacaeb1
Replace Alarm Control Panel FORMAT_ constants with CodeFormat enum ( #69861 )
2022-04-18 19:37:32 +02:00
Erik Montnemery
9b21a48048
Mend incorrectly imported MQTT config entries ( #68987 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-04-01 08:11:31 -07:00
Erik Montnemery
7e8d52e5a3
Fix race when handling rapid succession of MQTT discovery messages ( #68785 )
...
Co-authored-by: jbouwh <jan@jbsoft.nl>
2022-03-29 20:26:11 -07:00
Paulus Schoutsen
69fcce3b2c
Remove energy usage from the switch base class ( #68821 )
...
* Remove energy usage from the switch base class
* Remove unused attributes from integrations
2022-03-28 18:56:04 -10:00
Jan Bouwhuis
5afe8fd2db
Revert "Add MQTT notify platform ( #64728 )" ( #68505 )
...
This reverts commit e574a3ef1d
.
2022-03-22 12:51:24 +01:00
J. Nick Koston
723dcbafca
Complete fan speed transition from #59781 ( #67743 )
2022-03-09 10:38:12 +01:00
Jan Bouwhuis
e574a3ef1d
Add MQTT notify platform ( #64728 )
...
* Mqtt Notify service draft
* fix updates
* Remove TARGET config parameter
* do not use protected attributes
* complete tests
* device support for auto discovery
* Add targets attribute and support for data param
* Add tests and resolve naming issues
* CONF_COMMAND_TEMPLATE from .const
* Use mqtt as default service name
* make sure service has a unique name
* pylint error
* fix type error
* Conditional device removal and test
* Improve tests
* update description has_notify_services()
* Use TypedDict for service config
* casting- fix discovery - hass.data
* cleanup
* move MqttNotificationConfig after the schemas
* fix has_notify_services
* do not test log for reg update
* Improve casting types
* Simplify obtaining the device_id
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* await not needed
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Improve casting types and naming
* cleanup_device_registry signature change and black
* remove not needed condition
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-03-08 16:27:18 +01:00
Jan Bouwhuis
98adeb6070
Fix false positive MQTT climate deprecation warnings for defaults ( #67661 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-03-07 15:38:33 +01:00
Jan Bouwhuis
5ab4b5d15a
MQTT Improve warning override deprecated settings ( #67609 )
2022-03-04 12:39:29 +01:00
Jan Bouwhuis
9356bf1a8e
Fix MQTT config flow with advanced parameters ( #67556 )
...
* Fix MQTT config flow with advanced parameters
* Add test
2022-03-03 21:40:15 +01:00
Jan Bouwhuis
a97fe7aae0
Mqtt fix issue with displaying non UTF-8 payload ( #67471 )
...
* Mqtt fix issue with displaying non UTF-8 payload
* None or binary
* Casting and additional test
* casting
2022-03-02 17:01:47 +01:00
Erik Montnemery
5e4b16c69a
Remove custom WS command for removing MQTT devices ( #67381 )
...
* Remove custom WS command for removing MQTT devices
* Re-add removed test
2022-02-28 15:50:49 +01:00
Erik Montnemery
c7d59bb272
Fix race when unsubscribing from MQTT topics ( #67376 )
...
* Fix race when unsubscribing from MQTT topics
* Improve test
2022-02-28 14:19:50 +01:00
Jan Bouwhuis
8dbb184ed5
Add MQTT publish ACK timeout test ( #67062 )
2022-02-23 12:30:13 +01:00
Jan Bouwhuis
845bf80e72
Mqtt improve test coverage ( #66279 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-02-23 12:29:32 +01:00
Mike Degatano
a51d9012ad
Fix MQTT lights tests using `STATE_OFF` ( #67011 )
2022-02-21 22:52:31 -08:00
rubenverhoef
95de1dd446
Additional MQTT light command templates ( #63361 )
...
Co-authored-by: jbouwh <jan@jbsoft.nl>
2022-02-22 00:00:49 +01:00
Erik Montnemery
ba6d1976df
Improve MQTT device removal ( #66766 )
...
* Improve MQTT device removal
* Update homeassistant/components/mqtt/mixins.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Adjust tests
* Improve test coverage
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-02-18 13:45:25 +01:00
Erik Montnemery
2abcd7cd94
Correct state restoring for MQTT temperature sensors ( #66741 )
...
* Correct state restoring for MQTT temperature sensors
* Adjust test
* Adjust test
2022-02-18 11:35:44 +01:00
Erik Montnemery
98982c86e4
Add MQTT diagnostics ( #66730 )
...
* Add MQTT diagnostics
* Redact device tracker location
* Adjust tests
* Address comments from code review
2022-02-18 09:28:49 +01:00
Jan Bouwhuis
83846bb5cc
MQTT climate preset_modes rework ( #66062 )
...
* 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
f89de613d9
Improve MQTT binary_sensor test ( #66688 )
2022-02-17 00:06:42 +01:00
Erik Montnemery
335a918118
Create MQTT discovery flow when manual config is present ( #66248 )
...
* Create MQTT discovery flow when manual config is present
* Change to integration_discovery flow
* Add test
* Add default handler for integration_discovery
2022-02-11 10:31:51 +01: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
55d8314093
Fix cleanup of MQTT debug info ( #66104 )
2022-02-08 12:49:25 -08:00
Erik Montnemery
8245ff7473
Log transmitted MQTT messages ( #65550 )
2022-02-04 17:35:32 +01:00
Jan Bouwhuis
2f0d0998a2
Add Mqtt vacuum `unknown` state ( #65311 )
...
* Add Mqtt vacuum `unknown` status
* Update tests/components/mqtt/test_state_vacuum.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-02-03 16:50:39 +01:00
Jan Bouwhuis
cf52357229
Add MQTT light unknown state support ( #65308 )
...
* Add MQTT light unknown sate support
* Update homeassistant/components/mqtt/light/schema_basic.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/mqtt/light/schema_json.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/mqtt/light/schema_template.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update tests for default unknown state
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-02-03 16:49:57 +01:00
Jan Bouwhuis
2d011821ea
Add MQTT humidifier unknown state support ( #65302 )
...
* Add MQTT humidifier unknown state support
* Update homeassistant/components/mqtt/humidifier.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Fix tests for changed default optimistic state
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-02-03 16:49:09 +01:00
Jan Bouwhuis
711bd7169e
Add Mqtt Fan unknown state support ( #65301 )
...
* Add Mqtt Fan unknown state support
* Update homeassistant/components/mqtt/fan.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Adjust default state in tests
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-02-03 16:48:03 +01:00
Jan Bouwhuis
3d434dffc7
Add support Mqtt switch for unkown state ( #65294 )
...
* Mqtt switch allow unkown state
* correct type
* Update discovery tests
* Optimistic mode if not state_topic is configured.
* Default state UNKNOWN in optimistic mode
* fix discovery test
2022-02-03 16:47:24 +01:00
Jan Bouwhuis
63459feede
Return current state if template throws ( #65534 )
2022-02-03 16:46:36 +01:00
Erik Montnemery
f3a89de71f
Fix race when handling updated MQTT discovery data ( #65415 )
2022-02-02 17:12:22 -08:00
Erik Montnemery
fda0fbd115
Stringify MQTT payload in mqtt/debug/info WS response ( #65429 )
2022-02-02 18:08:48 +01:00
Jan Bouwhuis
2c07330794
Fix MQTT expire_after effects after reloading ( #65359 )
...
* Cleanup sensor expire triggers after reload
* fix test binary_sensor
* Also trigger cleanup parent classes
* Restore an expiring state after a reload
* correct discovery_update
* restore expiring state with remaining time
* Update homeassistant/components/mqtt/binary_sensor.py
description
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Log remaining time
* Move check
* check and tests reload
* remove self.async_write_ha_state()
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-02-02 16:14:52 +01:00
Jan Bouwhuis
6fdaec0847
Add MQTT siren platform ( #64440 )
...
* Add mqtt siren draft
* fix tests
* Intergrate notify platform
* tests and fixes siren platform
* Add tests notify platform
* config parameters and abbreviations
* remove duplicate key
* undo move topic abbreviation
* Move const CONF_MESSAGE_COMMAND_TEMPLATE
* Remove notify service integration
* Rework
* Update homeassistant/components/mqtt/siren.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Publish JSON by default
* Allow unknown state - rename value_template
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-01-31 10:31:57 +01:00
Jan Bouwhuis
bfaada34e2
Allow `unknown` state to be set ( #65183 )
2022-01-31 10:25:08 +01:00
Erik Montnemery
dccc4eba76
Remove artifacts from black formatting ( #65113 )
...
* Remove artifacts from black formatting
* Tweak
2022-01-28 17:00:01 +02:00
Jan Bouwhuis
0cabf3e577
Fix MQTT climate action null warnings ( #64658 )
2022-01-27 08:41:27 +01:00
Jan Bouwhuis
efe5b0ca81
Add command template for MQTT button ( #63838 )
...
* Add command template for MQTT button
* Move CONF_COMMAND_TEMPLATE
2022-01-23 12:48:41 +01:00
Jan Bouwhuis
31a9d64572
Improve code coverage MQTT integration ( #64546 )
2022-01-20 13:51:19 +01:00
Jan Bouwhuis
aa73e5bd72
Fix MQTT climate optimistic preset modes ( #63463 )
...
* Always publish when preset_mode is set
* Revert "Fixed isort error"
This reverts commit 1a3c5e6460
.
* isort
2022-01-11 17:08:26 +01:00
Erik Montnemery
3083f059cc
Drop last_reset attribute for non 'total' sensors ( #63880 )
...
* Drop last_reset attribute for non 'total' sensors
* Adjust MQTT tests
* Add exception for utility_meter
* Rewrite exception for utility_meter
* Add comment in utility_meter
* Tweak comment
2022-01-11 13:58:35 +01:00
Orce MARINKOVSKI
b78e22e012
Update MQTT light schema template ( #62759 )
...
* shema template update
* tests to cover the additional template variables
* fix flake8: too many blank lines
* Update schema_template.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-01-10 09:57:56 +01:00
Franck Nijhof
3f7275a9c7
Give scenes last activated state ( #62673 )
2022-01-07 19:02:32 +01:00
Erik Montnemery
1995a825f3
Reject MQTT light discovery using unsupported value_template ( #62682 )
...
* Reject MQTT light discovery using unsupported value_template
* Tweak
2022-01-03 17:16:26 +01:00
Jan Bouwhuis
86ed091dbf
Skip raw encoding test for cover ( #63322 )
2022-01-03 17:08:28 +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
061ce0c187
Fix mqtt reloading and rework tests ( #62950 )
...
* 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
0dab5e69db
Fix MQTT cover not using tilt_command_template ( #63080 )
2022-01-03 15:13:30 +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
Franck Nijhof
60b2cdd069
Allow binary sensor state to be None ( #60193 )
2021-12-22 12:24:29 +01:00
Dave T
043a4b06d0
Use new enums in mqtt tests ( #62520 )
2021-12-21 22:04:32 +01:00
Ville Skyttä
f913961d63
Use DeviceAutomationType in tests/components/[m-r]* ( #62443 )
2021-12-20 22:29:22 +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
epenet
c05eca1c82
Remove log flooding prevention logic from discovery info ( #61243 )
...
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-08 10:28:26 -10:00
Jan Bouwhuis
88b93546f3
Re-add-tests with new filters removed with #60854 ( #60895 )
2021-12-03 11:04:05 -08:00
epenet
b65b25c1bb
Move MqttServiceInfo to init.py ( #60905 )
...
Co-authored-by: epenet <epenet@users.noreply.github.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-12-03 19:34:48 +01:00
epenet
358922db56
Use dataclass for HassioServiceInfo ( #60824 )
...
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-03 14:05:56 +01:00
Erik Montnemery
9f4a99fe81
Revert "Add bytes support for bitwise template operations" ( #60854 )
2021-12-03 08:50:29 +01:00
J. Nick Koston
d7c4a669f1
Revert "Use HassioServiceInfo in mqtt tests" ( #60867 )
2021-12-02 10:13:41 -10:00
epenet
37200decf9
Use HassioServiceInfo in mqtt tests ( #60865 )
2021-12-02 10:10:50 -10:00
Jan Bouwhuis
3307e54363
Add MQTT availability template and encoding ( #60470 )
...
* Add MQTT availability template and encoding
* use generic encoding field
* pylint and cleanup
* remove additional topic check
2021-12-02 10:21:31 +01:00
epenet
6caaa5f6bd
Add compatibility tests for MqttServiceInfo ( #60754 )
...
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-01 17:04:49 +01:00
Franck Nijhof
16462df451
Add button device classes to MQTT ( #60628 )
2021-11-30 16:08:02 +01:00
Jan Bouwhuis
cd351cf22b
Fix test naming switch ( #60630 )
2021-11-30 15:45:06 +01:00
Jan Bouwhuis
2a2a20fcb3
Add mqtt sensor configurable state encoding for sensor and binary_sensor platform ( #60447 )
...
* Add mqtt sensor state encoding
* Make encoding attribute not specific to states
* Move encoding attribute to schema base
2021-11-30 14:04:24 +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
Hypnos
57fd632cd9
Add missing MQTT lock.open ( #60022 )
...
* Add missing MQTT lock.open
from:
https://community.home-assistant.io/t/mqtt-lock-open/232823/13
based on https://github.com/home-assistant/core/pull/48008
* Update homeassistant/components/mqtt/lock.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/mqtt/lock.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/mqtt/lock.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* removed `STATE_OPEN` from tests
* Apply suggestions from code review
* Format code
* Update lock.py
* Update test_lock.py
* Update test_lock.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-11-25 15:54:08 +01:00
Till Skrodzki
635d875b1d
Only accept valid hvac actions sent via mqtt ( #59919 )
...
* 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
7c3edf24f2
Allow MQTT selects to have a single or no options ( #60281 )
2021-11-24 20:06:12 +01:00
Franck Nijhof
5c443b626a
Use native datetime value in MQTT sensors ( #59923 )
2021-11-23 22:10:14 +01:00
David Beitey
1bcd62cd32
Add topic_template for mqtt.publish ( #53743 )
...
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-11-16 16:13:54 +01:00
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
Jan Bouwhuis
0c4863198e
Add command_template to MQTT number platform ( #58949 )
2021-11-02 18:21:49 +01:00
Chris Browet
2df1ba2346
Add device_class to MQTT switch ( #58931 )
2021-11-02 17:40:05 +01:00
Jan Bouwhuis
339117aceb
Add command_template to mqtt select platform ( #58934 )
2021-11-02 17:33:23 +01:00
Paulus Schoutsen
31153ac155
Move fixtures part 1 ( #58902 )
2021-11-01 20:47:05 -07:00
Erik Montnemery
f3bd13d179
Fix regression in MQTT discovery ( #58684 )
...
* Fix regression in MQTT discovery
* Update test
2021-10-29 15:59:16 +02: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
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
Franck Nijhof
027e167d95
Add support for unit of measurement in MQTT number platform ( #58343 )
2021-10-25 09:44:43 +02:00
Ville Skyttä
77120a5137
Use http.HTTPStatus in components/m* ( #58251 )
2021-10-22 23:54:36 +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
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
879144b48d
MQTT rework constants ( #57529 )
...
* reference CONF_TOPIC to .const
* Organize common mqtt constants
2021-10-12 11:26:38 +02: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
Erik Montnemery
7223c59e79
Allow resetting an MQTT number ( #57161 )
...
* Allow resetting an MQTT number
* Add abbreviation
2021-10-07 13:54:34 +02:00
Paulus Schoutsen
a4d9019ffc
Refactor persistent notification to no longer route all data via a service ( #57157 )
...
* Convert persistent notification tests to async
* Create/dismiss persistent notifications in exposed functions, not service calls
* Fix notify persistent_notification
* Remove setting up persistent_notification
* Drop more setups
* Empty methods
* Undeprecate sync methods because too big task
* Fix setup clearing notifications
* Fix a bunch of tests
* Fix more tests
* Uno mas
* Test persistent notification events
* Clean up stale comment
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 12:58:00 +02:00
Erik Montnemery
f548d1dba7
Prevent opening of sockets in mqtt tests ( #57101 )
2021-10-05 11:14:53 +02:00
Erik Montnemery
099428fa73
Use hass_client_no_auth test fixture in additional tests ( #57037 )
2021-10-04 13:37:05 +02:00
Erik Montnemery
4d7e3cde5a
Minor cleanup and test coverage improvement for MQTT ( #55265 )
2021-09-27 17:45:52 +02:00
Ville Skyttä
b10fc89a6b
Automation trigger info type hint improvements ( #55402 )
...
* Make automation trigger info a TypedDict
* zwave_js trigger type hint fixes
* Remove redundant automation trigger info field presence checks
* Use async_initialize_triggers in mqtt and tasmota device_trigger tests
2021-09-04 02:25:51 +02:00
Erik Montnemery
18c03e2f8d
Fix race in MQTT sensor when last_reset_topic is configured ( #55463 )
2021-08-30 23:32:35 +02:00
Erik Montnemery
ed53bb1d91
Revert "Deprecate last_reset options in MQTT sensor" ( #55457 )
...
This reverts commit f9fa5fa804
.
2021-08-30 16:58:48 +02:00
Franck Nijhof
96303a1d80
Fix MQTT add-on discovery to be ignorable ( #55250 )
2021-08-26 11:14:42 +02:00
J. Nick Koston
e6e8d7eded
Convert color temperature to visible color in lights ( #55219 )
2021-08-25 21:56:36 +02:00
Erik Montnemery
2c997586eb
Deduplicate code in MQTT alarm_control_panel tests ( #55149 )
2021-08-24 18:06:39 +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
5bb9aa8f3d
Remove MQTT Fan legacy speeds ( #54768 )
...
* Remove MQTT Fan legacy speeds
* deprecated attibutes are not disruptive
2021-08-24 11:21:35 +02:00
Erik Montnemery
f9fa5fa804
Deprecate last_reset options in MQTT sensor ( #54840 )
2021-08-18 20:22:01 +02:00
Franck Nijhof
4546e14674
Fix MQTT to allow setting an unknown Select state ( #53227 )
2021-07-21 10:02:07 +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
520b500165
Fix MQTT cover optimistic mode ( #52392 )
...
* Fix MQTT cover optimistic mode
* Add test
2021-07-01 17:34:59 +02:00
Erik Montnemery
b77f2b9e12
Filter MQTT camera JSON attributes ( #52279 )
...
* Filter MQTT camera JSON attributes
* Add missing attribute to blocked list
2021-06-29 12:14:02 +02:00
Erik Montnemery
39a064683a
Filter MQTT cover JSON attributes ( #52282 )
2021-06-29 11:59:23 +02:00
Erik Montnemery
30a9198d97
Add test to MQTT device tracker ( #52292 )
2021-06-29 11:33:26 +02:00
Erik Montnemery
a7dd7c1a3d
Filter MQTT select JSON attributes ( #52288 )
2021-06-29 11:22:58 +02:00
Erik Montnemery
74e61ab7f7
Filter MQTT switch JSON attributes ( #52290 )
2021-06-29 11:22:25 +02:00
Erik Montnemery
de4cfb0ce2
Filter MQTT vacuum JSON attributes ( #52291 )
2021-06-29 11:21:22 +02:00
Erik Montnemery
61f7f5c96a
Filter MQTT sensor JSON attributes ( #52289 )
2021-06-29 11:19:40 +02:00
Erik Montnemery
e0f7987544
Filter MQTT fan JSON attributes ( #52283 )
2021-06-29 11:18:50 +02:00
Erik Montnemery
71a0e474cc
Filter MQTT number JSON attributes ( #52286 )
2021-06-29 11:16:57 +02:00
Erik Montnemery
3b89fcfe83
Filter MQTT lock JSON attributes ( #52285 )
2021-06-29 11:16:07 +02:00
Erik Montnemery
040c88f982
Filter MQTT climate JSON attributes ( #52280 )
2021-06-29 11:13:58 +02:00
Erik Montnemery
91b4f7d1d5
Filter MQTT alarm JSON attributes ( #52278 )
2021-06-29 10:32:23 +02:00
Erik Montnemery
7a4f3fe7b8
Filter MQTT light JSON attributes ( #52242 )
2021-06-28 14:37:26 +02:00
Erik Montnemery
e14480599b
Add value_template support to MQTT number ( #52155 )
2021-06-28 10:23:34 +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
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
2351f2d95e
Warn when receiving message on illegal MQTT discovery topic ( #52106 )
...
* Warn when receiving message on illegal MQTT discovery topic
* Fix test
2021-06-23 15:53:17 +02:00
Erik Montnemery
77de233679
Update MQTT number to treat received payload as UTF-8 ( #52121 )
...
* Update MQTT number to treat received payload as UTF-8
* Lint
2021-06-23 15:35:18 +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
a4587b5f3b
Deprecate support for undocumented value_template in MQTT light ( #51589 )
2021-06-08 08:23:51 +02:00
Massimiliano Cannarozzo
5a5a145778
Make all MQTT cover payloads optional ( #50579 )
...
* Remove unused constant
* Make payload_close optional
* Make payload_open optional
* Compute supported features based on config
2021-05-26 13:50:44 +03: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
154c849eac
Filter unsupported parameters from light service calls ( #51084 )
...
* Filter unsupported parameters from light service calls
* Silence pylint
* Fix deconz tests
* Fix mqtt tests
* Fix scene tests
* Fix trådfri emulated CT
* Fix mqtt tests
2021-05-26 08:02:59 +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
Erik Montnemery
d4d335fb9c
Fix MQTT debug info for removed triggers ( #50859 )
2021-05-20 10:27:38 +03:00
Michael Klamminger
7c7432a582
Add entity_id to mqtt sensor templates ( #50773 )
...
* Add entity_id to mqtt sensor
* update test comment
2021-05-19 14:38:18 +02:00
Shay Levy
109b08bb57
Remove MQTT cover deprecated options ( #50263 )
...
* Remove MQTT cover deprecated options
* Fix pylint
2021-05-19 14:34:20 +02:00
Ruslan Sayfutdinov
62386c8676
Enable type checks for device_tracker ( #50805 )
...
* Enable type checks for device_tracker
* Fix MQTT test
2021-05-19 09:36:26 +01: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
Michael Klamminger
3554316f3f
Update MQTT cover template handling ( #50236 )
...
* flake 8
* Implement feedback from PR
* update warning message
* added and updated tests
* remove _has_tilt_topic variable
* flake 8
* Implement feedback from PR
* update warning message
* added and updated tests
* remove _has_tilt_topic variable
* renamed _tilt_message_received to _tilt_payload_received
* merged with latesed upstream/dev
* converted if to try except for type check
* Implemented the suggestions of @emontnemery
* Tweak tests
* logger info to debug
Co-authored-by: Shay Levy <levyshay1@gmail.com>
* cast tilt payload as int; combine exceptions to one line
* Add test for JSONDecodeError
* Update homeassistant/components/mqtt/cover.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Shay Levy <levyshay1@gmail.com>
2021-05-17 19:31:11 +02:00
Jan Bouwhuis
7ab505633d
Ignore empty output from MQTT fan's value template ( #50122 )
...
* Allow empty payload
* Add tests for ignoring empty payload
* logging on empty state and osccilation with tests
* Improve warning log when invalid value is received
2021-05-07 13:22:08 +02:00
Ville Skyttä
77d5244577
Use device registry CONNECTION_* constants ( #49923 )
2021-04-30 23:58:50 +02:00
Erik Montnemery
e96cbccc92
Improve color conversion for RGBWW lights ( #49807 )
2021-04-28 15:46:41 +02:00
Franck Nijhof
89e7983ee0
Add Blueprint foundation to Scripts ( #48621 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-04-27 15:15:38 -07:00
Erik Montnemery
fdadacd158
Improve color conversion for RGBW lights ( #49764 )
2021-04-27 20:07:55 +02:00
Ville Skyttä
153d6e891e
Use config_entries.SOURCE_* constants ( #49631 )
2021-04-25 11:27:40 +02:00
Jan Bouwhuis
ff367cfcb6
Mqtt cover avoid warnings on empty payload ( #49253 )
...
* No warnings on extra json values with templates
* ignore empty received payload
2021-04-20 15:47:40 +02:00
Erik Montnemery
ec56ae2cbc
Set deprecated supported_features for MQTT JSON light ( #49167 )
...
* Set deprecated supported_features for MQTT json light
* Update homeassistant/components/light/__init__.py
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-04-15 17:24:21 +02:00
Jan Bouwhuis
74d7293ab8
mqtt fan percentage to speed_range and received speed_state fix ( #49060 )
...
* percentage to speed_range and get speed state fix
* Update homeassistant/components/mqtt/fan.py
* Update homeassistant/components/mqtt/fan.py
* Update homeassistant/components/mqtt/fan.py
* Update homeassistant/components/mqtt/fan.py
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-04-11 13:53:07 -10:00
Jan Bouwhuis
28ad5b5514
Implement percentage_step and preset_mode is not not speed fix for MQTT fan ( #48951 )
2021-04-09 16:14:48 -07:00
Erik Montnemery
5e8559e3cc
Validate supported_color_modes for MQTT JSON light ( #48836 )
2021-04-08 12:40:48 -07:00
Erik Montnemery
9f2fb37e17
Flag brightness support for MQTT RGB lights ( #48718 )
2021-04-06 12:39:29 +02:00
Erik Montnemery
b26779a27a
Add id to automation triggers ( #48464 )
2021-03-31 14:56:04 +02:00