G Johansson
666e8e133e
Cover state is enum ( #127144 )
...
* Change light state to use enum
* Adjust cover tests
* Update cover
* Fix covers
* Some tests
* More tests
* Fix tests
* Fix
2024-10-08 18:39:04 +02:00
Jan Bouwhuis
21affac571
Rename mqtt mixins module to entity.py
( #126279 )
2024-09-19 20:50:33 +02:00
Marc Mueller
7453b7df63
Improve mqtt schema typing ( #120407 )
2024-06-25 13:03:18 +02:00
J. Nick Koston
811ec57c31
Convert mqtt entity discovery to use callbacks ( #118200 )
2024-05-26 16:12:40 -10:00
Jan Bouwhuis
b7f1f805fa
Simplify subscription mqtt entity platforms ( #118177 )
2024-05-26 09:25:54 -10:00
J. Nick Koston
80371d3a73
Reduce duplicate publish code in mqtt ( #118163 )
2024-05-26 01:22:54 -10:00
J. Nick Koston
5d37217d96
Avoid expensive inspection of callbacks to setup mqtt subscriptions ( #118161 )
2024-05-26 01:22:44 -10:00
J. Nick Koston
9be829ba1f
Make mqtt internal subscription a normal function ( #118092 )
...
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2024-05-25 11:34:24 -10:00
Jan Bouwhuis
01f3a5a97c
Consequently ignore empty MQTT state payloads and set state to unknown
on "None" payload ( #117813 )
...
* Consequently ignore empty MQTT state payloads and set state to `unknown` on "None" payload
* Do not change preset mode behavior
* Add device tracker ignoring empty state
* Ignore empty state for lock
* Resolve merge errors
2024-05-25 01:29:43 +02:00
Jan Bouwhuis
35a20d9c60
Refactor mqtt callbacks for cover ( #118044 )
2024-05-24 10:26:24 -10:00
Jan Bouwhuis
050fc73056
Refactor shared mqtt schema's to new module ( #117944 )
...
* Refactor mqtt schema's to new module
* Remove unrelated change
2024-05-23 01:12:25 +02:00
Marc Mueller
59a6035d3f
Add empty line after module docstring [j-m] ( #112700 )
2024-03-08 09:01:29 -05:00
Jan Bouwhuis
f8f31627ce
Refactor ranging utils for mqtt cover ( #105739 )
...
* Refactor ranging utils for mqtt cover
* Use literals for default min and max percentage
2023-12-21 11:54:05 +01:00
Jan Bouwhuis
c7f6ab2457
Add MQTT valve platform ( #105766 )
...
* Add mqtt valve platform
* No stop topic-reports_position and validation
* Do not allow state_open, state_closed with position reporing valve
* Allow open/close feature to be disabled
* Follow up comments
* Rename
* Apply defaults in validator
* Update docstr
2023-12-20 07:49:49 +01:00
Jan Bouwhuis
82264a0d6b
Fix mqtt cover state is open after receiving stopped payload ( #104726 )
2023-11-29 16:29:42 +01:00
Jan Bouwhuis
25ab622b51
Rename mqtt entry setup helpers to reflect their purpose ( #102378 )
...
Rename mqtt entry setup helpers
2023-10-20 13:36:24 +02:00
Jan Bouwhuis
1efbba2631
Do not fail MQTT setup if covers configured via yaml can't be validated ( #102304 )
...
Add cover
2023-10-20 10:51:42 +02:00
Jan Bouwhuis
c6d62faff3
Avoid redundant calls to async_write_ha_state in mqtt cover ( #100720 )
...
Avoid redundant calls to async_write_ha_state
2023-09-22 22:47:07 +02:00
Jan Bouwhuis
4c65c92fb0
Use shorthand attrs for MQTT cover ( #100710 )
...
* User shorthand attrs for MQTT cover
* Cleanup constructor
* Cleanup constructor
2023-09-22 13:41:31 +02:00
Jan Bouwhuis
e3837cd1e0
Use shorthand attr for mqtt assumed_state ( #100241 )
2023-09-12 22:21:13 +02:00
Jan Bouwhuis
5fcb69e004
Use shorthanded attributes for MQTT cover ( #100230 )
2023-09-12 13:46:43 -05:00
Jan Bouwhuis
447fbf58c9
Change naming of MQTT entities to correspond with HA guidelines ( #95159 )
...
* Set has_entity_name if device_name is set
* revert unneeded formatting change
* Add image platform
* Follow up comment
* Don't set `has_entity_name` without device name
* Only set has_entity_name if a valid name is set
* Follow device_class name and add tests
* Follow up comments add extra tests
* Move to helper - Log a warning
* fix test
* Allow to assign None as name explictly
* Refactor
* Log info messages when device name is not set
* Revert scene schema change - no device link
* Always set has_entity_name with device mapping
* Always set `_attr_has_entity_name`
* Cleanup
2023-07-21 12:52:10 +02:00
Jan Bouwhuis
5fb41777fd
Cleanup MQTT schema from previous removed options ( #94110 )
...
* Cleanup removed validator schema option of #62680
* Cleanup removed climate options and abbreviations
* Removed white_value options for mqtt light
* Remove whaite value from mqtt json light
2023-06-09 12:12:20 +02:00
Jan Bouwhuis
661aedde90
Remove MQTT platform schema warnings ( #93785 )
2023-05-31 09:02:48 +02:00
epenet
ba23816a0c
Inverse json import logic ( #88099 )
...
* Fix helpers and util
* Adjust components
* Move back errors
* Add report
* mypy
* mypy
* Assert deprecation messages
* Move test_json_loads_object
* Adjust tests
* Fix rebase
* Adjust pylint plugin
* Fix plugin
* Adjust references
* Adjust backup tests
2023-02-16 11:37:57 +01:00
Franck Nijhof
ca1a12898c
Enable Ruff D212 ( #87347 )
2023-02-03 23:08:48 +01:00
Franck Nijhof
e738924780
Enable Ruff SIM105 ( #86759 )
...
* Enable Ruff SIM105
* Adjust existing cases
2023-01-26 21:06:22 -05:00
Franck Nijhof
800b8abe39
Code styling tweaks to the MQTT integration ( #85463 )
2023-01-08 22:07:10 +01:00
Jan Bouwhuis
ee21bc5d7f
Allow MQTT device_class or state_class to be set as None
( #85106 )
...
* Allow MQTT device_class to be set as `None`
* Add test
* Also allow sensor state_class to be `None`
2023-01-04 15:21:07 +01:00
Jan Bouwhuis
9cf86b234b
Add optimistic option for MQTT climate ( #84777 )
2023-01-02 11:39:42 +01:00
Franck Nijhof
baef267f33
String formatting and max line length - Part 3 ( #84394 )
2022-12-22 13:35:47 +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
Marc Mueller
c0425619e2
Fix round typing [mqtt] ( #82629 )
2022-11-24 14:39:01 +01:00
epenet
34607d4410
Enforce CoverEntityFeature ( #82457 )
...
* Enforce CoverEntityFeature
* Adjust pylint
2022-11-22 07:09:19 +01:00
Jan Bouwhuis
7c2e7863d2
Remove legacy YAML support from MQTT ( #82102 )
2022-11-17 22:55:31 +01:00
epenet
17573196c8
Adjust type hints for CoverEntityFeature ( #82238 )
2022-11-17 08:39:44 +01: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
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
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
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
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
90aba6c523
Add cv.deprecated to MQTT modern schema's too ( #76884 )
...
Add cv.deprcated to modern schema too
2022-08-19 11:12:47 +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
Erik Montnemery
f05b4a0ca0
Fire event_mqtt_reloaded only after reload is completed ( #74226 )
2022-06-30 10:15:25 -07:00
epenet
10dc38e0ec
Adjust CoverEntity property type hints in components ( #73943 )
...
* Adjust CoverEntity property type hints in components
* Revert changes to rflink
* Revert changes to wilight
2022-06-25 11:59:56 +02:00
epenet
a92ab7a669
Adjust CoverEntity function type hints in components ( #73912 )
...
Adjust CoverEntity functions in components
2022-06-24 06:40:26 +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
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
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