hi all, I upgraded to 2022.8.4 (from 2021.1.5) and my mqtt automations stopped working. My MQTT sensors still work but incoming MQTT events no longer trigger automations. I do not appear to be the only person with this problem (see https://github.com/home-assistant/core/issues/76619).
The home-assistant UI shows this error:
Logger: homeassistant.config
Source: config.py:455
First occurred: 11:46:36 AM (13 occurrences)
Last logged: 11:46:36 AM
Invalid config for [automation]: Integration 'mqtt' does not provide trigger support. Got OrderedDict([('config', {}), ('frontend', {}), ('history', {}), ('homeassistant', OrderedDict([('auth_providers', [OrderedDict([('api_password', 'ddd'), ('type', 'legacy_api_password')]), OrderedDict([('allow_bypass_login', True), ('trusted_networks', ['127.0.0.1', '::1']), ('type', 'trusted_networks')])]), ('customize', OrderedDict([('sensor.bed_pi_full', OrderedDict([('hidden', True)])), ('sensor.bedroom_full', OrderedDict([('hidden', True)]))])), ('elevation', 36), ('latitude', 48.83954.... (See /srv/homeassistant/config/configuration.yaml, line 49).
My automation.yaml contains 13 automations like this one:
- action:
data:
value: RFI Monde
service: shell_command.radio_info
alias: key 1 - RFI Monde
trigger:
payload: key 1
platform: mqtt
topic: keyboard
According to the current documentation Automation Trigger - Home Assistant my code seems OK.
Can anybody help me understand the problem?
When I start home-assistant I see this stack trace:
Aug 13 09:47:22 entrance sh[16034]: 2022-08-13 09:47:22.453 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry configuration.yaml for mqtt
Aug 13 09:47:22 entrance sh[16034]: Traceback (most recent call last):
Aug 13 09:47:22 entrance sh[16034]: File "/tmp/ve/lib/python3.10/site-packages/homeassistant/config_entries.py", line 357, in async_setup
Aug 13 09:47:22 entrance sh[16034]: result = await component.async_setup_entry(hass, self)
Aug 13 09:47:22 entrance sh[16034]: File "/tmp/ve/lib/python3.10/site-packages/homeassistant/components/mqtt/__init__.py", line 463, in async_setup_entry
Aug 13 09:47:22 entrance sh[16034]: await async_forward_entry_setup_and_setup_discovery(entry)
Aug 13 09:47:22 entrance sh[16034]: File "/tmp/ve/lib/python3.10/site-packages/homeassistant/components/mqtt/__init__.py", line 456, in async_forward_entry_setup_and_setup_discovery
Aug 13 09:47:22 entrance sh[16034]: await _async_setup_discovery(hass, conf, entry)
Aug 13 09:47:22 entrance sh[16034]: File "/tmp/ve/lib/python3.10/site-packages/homeassistant/components/mqtt/__init__.py", line 162, in _async_setup_discovery
Aug 13 09:47:22 entrance sh[16034]: await discovery.async_start(hass, conf[CONF_DISCOVERY_PREFIX], config_entry)
Aug 13 09:47:22 entrance sh[16034]: File "/tmp/ve/lib/python3.10/site-packages/homeassistant/components/mqtt/discovery.py", line 246, in async_start
Aug 13 09:47:22 entrance sh[16034]: hass.data[DISCOVERY_UNSUBSCRIBE] = await asyncio.gather(
Aug 13 09:47:22 entrance sh[16034]: File "/tmp/ve/lib/python3.10/site-packages/homeassistant/components/mqtt/discovery.py", line 248, in <genexpr>
Aug 13 09:47:22 entrance sh[16034]: mqtt.async_subscribe(hass, topic, async_discovery_message_received, 0)
Aug 13 09:47:22 entrance sh[16034]: AttributeError: module 'homeassistant.components.mqtt' has no attribute 'async_subscribe'
Could the error in the stack trace indicate that MQTT triggers are broken? The full startup messages are in https://github.com/home-assistant/core/issues/76619
As an aside, why does the log show a random bit of configuration and one that includes my API password?