Commit Graph

16 Commits (7e11fec761dcdc108cd8e355c4f19d1a79d50270)

Author SHA1 Message Date
Jan Bouwhuis caaa03536b
Cleanup mqtt PLATFORMS constant and CI-test platform filters (#112847) 2024-03-09 23:48:54 +01:00
Jan Bouwhuis 09f1ec78a5
Handle template errors on MQTT payload handling (#110180)
* Handle template errors on MQTT payload handling (alt)

* Handle mqtt event en image template errors correctly
2024-02-13 10:59:55 +01:00
J. Nick Koston c399cab427
Small speed up to checking core state (#107845) 2024-01-18 08:41:32 -10:00
Jan Bouwhuis f0ec1235b1
Remove naming warnings and work-a-rounds for incorrectly configured MQTT entities (#107188)
* Remove naming warnings for MQTT entities

* Remove unused const
2024-01-05 09:32:22 +01:00
Jan-Philipp Benecke 9326ea09a5
Update m* tests to use entity & device registry fixtures (#103980) 2023-11-15 10:33:11 +01:00
Jan Bouwhuis 6b265120b3
Fix entity name attribute on mqtt entity is not removed on update (#100187)
Fix entity name attribute is not remove on update
2023-09-12 15:22:37 +02:00
Franck Nijhof 868a5f377f
Ruff: isort don't split imports based on trailing comma (#98162) 2023-08-10 14:27:03 +02:00
Jan Bouwhuis 9c6c391eea
Offer work- a-round for MQTT entity names that start with the device name (#97495)
Co-authored-by: SukramJ <sukramj@icloud.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-08-01 10:03:08 +02:00
Jan Bouwhuis 3fcfe7d0c6
Set mqtt entity name to `null` when it is a duplicate of the device name (#97304) 2023-07-27 09:23:23 +02: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 bb15923968
Rename MQTT entry mock and cleanup (#91223)
Rename to mqtt_mock_entry and cleanup
2023-04-12 09:43:03 +02:00
Jan Bouwhuis 0570405a3c
Prepare MQTT platform tests part6 (#90129)
* Tests lock

* Tests mixins

* Tests number

* Tests scene
2023-03-24 08:41:36 +01:00
Jan Bouwhuis dc5f35a85e
Add missed type hints on MQTT platform tests (#87781) 2023-02-09 15:22:30 +01:00
Jan Bouwhuis df76e31cdf
Apply MQTT fixture types on platform tests (#87722)
* Apply MQTT fixture types on platform tests

* Add caplog type hint

* Add hass_ws_client type hint

* Add tmp_path type hint

* Add hass_client_no_auth type hint
2023-02-09 09:48:22 +01:00
Jan Bouwhuis 1a414f1433
Add hass and `None` return type on MQTT platform tests (#87713)
Add hass and `None` return type on MQTT tests
2023-02-08 18:08:03 +01: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