Commit graph

1525 commits

Author SHA1 Message Date
Jan Bouwhuis
3a4341dbeb
Do not fail MQTT setup if device trackers configured via yaml can't be validated (#102308)
Add device_tracker
2023-10-19 18:18:04 +02:00
Jan Bouwhuis
fb984b5218
Do not fail MQTT setup if camera's configured via yaml can't be validated (#102302)
Add camera
2023-10-19 18:17:06 +02:00
Jan Bouwhuis
651b725cc0
Do not fail MQTT setup if binary sensors configured via yaml can't be validated (#102300)
Add binary_sensor
2023-10-19 18:15:21 +02:00
Jan Bouwhuis
d149bffb07
Do not fail MQTT setup if lights configured via yaml can't be validated (#101649)
* Add light

* Deduplicate code

* Follow up comment
2023-10-19 17:34:43 +02:00
Jan Bouwhuis
c377cf1ce0
Do not fail mqtt entry on single platform config schema error (#101373)
* Do not fail mqtt entry on platform config

* Raise on reload with invalid config

* Do not store issues

* Follow up
2023-10-19 12:06:33 +02:00
Franck Nijhof
1944b2952c
Replace object select in service calls with more UI-friendly selectors (#101722) 2023-10-10 05:50:12 +02:00
Jan Bouwhuis
db0c5bbbea
Fix mqtt sensor or binary_sensor state not saved after expiry (#101670)
Fix mqtt sensor state not saved after expire
2023-10-08 20:57:14 +02:00
Jan Bouwhuis
9407c49819
Remove platform key and rename schema for mqtt device_automation (#101582)
Refactor mqtt device_automation
2023-10-07 20:49:05 +02:00
Jan Bouwhuis
f4ac2b7eeb
Remove platform key and rename schema for mqtt tag (#101580) 2023-10-07 20:48:35 +02:00
Jan Bouwhuis
4553de5cbf
Use string conversion over isinstance in mqtt message handling if possible (#101364) 2023-10-06 12:15:01 +02:00
Jan Bouwhuis
a3fe120457
Raise vol.Invalid for invalid mqtt device_tracker config (#101399)
Raise vol.Invalid for invalid mqtt device_tracker
2023-10-04 19:36:34 +02:00
Ville Skyttä
5551a345ea
Remove some unnecessary uses of regular expressions (#101182) 2023-10-03 20:55:00 -05:00
Jan Bouwhuis
257e608c13
Use dataclass for mqtt TimestampedPublishMessage (#101124) 2023-09-29 20:11:30 +02:00
Jan Bouwhuis
0ded0ef4ee
Use dataclass instead of attr slots for mqtt PublishMessage and ReceiveMessage (#101062)
Use dataclass instead of attr slots
2023-09-28 20:36:30 +02:00
Jan Bouwhuis
77c519220d
Use dataclass for mqtt Subscription (#101064) 2023-09-28 20:35:49 +02:00
Jan Bouwhuis
dc1d3f727b
Fix handling reload with invalid mqtt config (#101015)
Fix handling reload whith invalid mqtt config
2023-09-27 20:59:19 -04:00
Jan Bouwhuis
0f38cd5794
Allow to reset an mqtt lock to an unknown state (#100985) 2023-09-27 09:50:01 +02:00
Jan Bouwhuis
59a26010ba
Cleanup redundant mqtt entity constructors (#100939)
* Remove redundant mqtt entity constructors

* Remove unrelated change

* Follow up comment

* Revert changes to mqtt update platform

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-09-26 23:03:11 +02:00
Jan Bouwhuis
8ec11910af
Allow discovery config update mqtt update entities (#100957) 2023-09-26 15:21:27 -05:00
Jan Bouwhuis
9254eea9e2
Remove unused attribute for MQTT lawn_mower (#100946)
Remove unused attributes for MQTT lawn_mower
2023-09-26 20:18:52 +02:00
Jan Bouwhuis
4d7e3d2b0f
Remove redundant initial assigment for mqtt siren (#100945) 2023-09-26 20:07:54 +02:00
Jan Bouwhuis
20a2e129fb
Intialize mqtt lock in an unknown state in pessimistic mode (#100943)
Intialize mqtt lock as unknown in pessimistic mode
2023-09-26 19:53:45 +02:00
Jan Bouwhuis
60b8775f4a
Avoid redundant calls to async_write_ha_state in mqtt siren (#100813)
* Avoid redundant calls to async_write_ha_state

* Add comment
2023-09-25 22:36:13 +02:00
Jan Bouwhuis
7258bc6457
Avoid redundant calls to async_write_ha_state in mqtt vacuum (#100799)
* Avoid redundant calls to async_write_ha_state

* Add comment

* Rephrase
2023-09-25 22:17:29 +02:00
Jan Bouwhuis
ea1108503d
Rework and fix mqtt siren writing state and attributes (#100871)
Rework mqtt siren writing state and attributes
2023-09-25 21:08:14 +02:00
Jan Bouwhuis
30c7e7fbdf
Avoid redundant calls to async_ha_write_state mqtt update platform (#100819)
Avoid redundant calls to async_ha_write_state
2023-09-25 18:08:02 +02:00
Jan Bouwhuis
cd3d3b76a3
Avoid redundant calls to async_ha_write_state in mqtt text (#100816)
Avoid redundant calls to async_ha_write_state
2023-09-25 18:07:24 +02:00
Jan Bouwhuis
8d10cdce4e
Avoid redundant calls to async_ha_write_state in mqtt switch (#100815)
Avoid redundant calls to async_ha_write_state
2023-09-25 18:06:19 +02:00
Jan Bouwhuis
33d45b3454
Avoid redundant calls to async_write_ha_state in mqtt select (#100809)
Avoid redundant calls to async_write_ha_state
2023-09-25 18:05:42 +02:00
Jan Bouwhuis
180f248370
Avoid redundant calls to async_write_ha_state in mqtt number (#100808)
Avoid redundant calls to async_write_ha_state
2023-09-25 18:05:14 +02:00
Jan Bouwhuis
98cc2e8098
Avoid redundant calls to async_write_ha_state in mqtt lock (#100802)
Avoid redundant calls to async_write_ha_state
2023-09-25 18:04:33 +02:00
Jan Bouwhuis
ce02cbefc9
Avoid redundant calls to async_write_ha_state in mqtt lawn_mower (#100795)
Avoid redundant calls to async_write_ha_state
2023-09-25 18:03:52 +02:00
Jan Bouwhuis
002be37257
Rework and added tests for mqtt event (#100769)
Use write_state_on_attr_change and add tests
2023-09-25 18:02:17 +02:00
Jan Bouwhuis
f83a597603
Avoid redundant calls to async_write_ha_state in mqtt humidifier (#100781)
Avoid redundant calls to async_write_ha_state
2023-09-25 18:00:08 +02:00
Jan Bouwhuis
3da4815522
Avoid redundant calls to async_write_ha_state for mqtt fan (#100777)
Avoid redundant calls to async_write_ha_state
2023-09-25 17:59:33 +02:00
Jan Bouwhuis
edb28be964
Avoid redundant calls to async_write_ha_state in mqtt device_tracker (#100767)
Avoid redundant calls to async_ha_write_state
2023-09-24 12:52:13 +02:00
Jan Bouwhuis
14b39c3bcf
Correct some typo's in MQTT issue string (#100759) 2023-09-23 19:05:52 +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
5b422daf36
Avoid redundant calls to async_write_ha_state in MQTT light (#100690)
* Limit state writes for mqtt light

* Additional tests and review follow up
2023-09-22 13:32:30 +02:00
Jan Bouwhuis
87ae5add8a
Fix mqtt light rgbww update without state topic (#100707)
* Fix mqtt light rgbww update without state topic

* Add @callback decprator and correct mired conv
2023-09-22 13:31:29 +02:00
Jan Bouwhuis
a66ad39c4e
Assign color_mode for mqtt light as ColorMode (#100709) 2023-09-22 12:09:37 +02:00
Jan Bouwhuis
384adb1c87
Avoid redundant calls to async_write_ha_state in MQTT climate & water_heater (#100696)
Limit state writes for mqtt climate & water_heater
2023-09-22 11:22:57 +02:00
Jan Bouwhuis
1041610a70
Avoid redundant calls to async_write_ha_state in MQTT mqtt alarm_control_panel (#100691)
Limit state writes for mqtt alarm_control_panel
2023-09-22 11:22:09 +02:00
Jan Bouwhuis
aed3ba3acd
Avoid redundant calls to async_ha_write_state in MQTT (binary) sensor (#100438)
* Only call `async_ha_write_state` on changes.

* Make helper class

* Use UndefinedType

* Remove del

* Integrate monitor into MqttEntity

* Track extra state attributes and availability

* Add `__slots__`

* Add monitor to MqttAttributes and MqttAvailability

* Write out loop

* Add test

* Make common test and parameterize

* Add test for last_reset attribute

* MqttMonitorEntity base class

* Rename attr and update docstr `track` method.

* correction doct

* Implement as a decorator

* Move tracking functions into decorator

* Rename decorator

* Follow up comment
2023-09-21 13:33:26 +02:00
Jan Bouwhuis
e3837cd1e0
Use shorthand attr for mqtt assumed_state (#100241) 2023-09-12 22:21:13 +02:00
Jan Bouwhuis
eb0ab3de93
User shorthand attr for mqtt alarm_control_panel (#100234) 2023-09-12 21:28:29 +02:00
Jan Bouwhuis
5fcb69e004
Use shorthanded attributes for MQTT cover (#100230) 2023-09-12 13:46:43 -05: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
Jan Bouwhuis
20d0ebe3fa
Add TYPE_CHECKING condition on type assertions for mqtt (#100107)
Add TYPE_CHECKING condition on type assertions
2023-09-11 10:58:33 +02:00