Rework MQTT config merging and adding defaults (#90529)
* Cleanup config merging and adding defaults * Optimize and update tests * Do not mix entry and yaml config * Make sure hass.data is initilized * remove check on get_mqtt_data * Tweaks to MQTT client * Remove None assigment mqtt client and fix mock
This commit is contained in:
parent
690a0f34e5
commit
4a0d3e881a
10 changed files with 77 additions and 180 deletions
|
@ -288,8 +288,8 @@ class EntityTopicState:
|
|||
class MqttData:
|
||||
"""Keep the MQTT entry data."""
|
||||
|
||||
client: MQTT | None = None
|
||||
config: ConfigType | None = None
|
||||
client: MQTT
|
||||
config: ConfigType
|
||||
debug_info_entities: dict[str, EntityDebugInfo] = field(default_factory=dict)
|
||||
debug_info_triggers: dict[tuple[str, str], TriggerDebugInfo] = field(
|
||||
default_factory=dict
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue