I’m having some issues getting this working too. It completely messes up MQTT discovery when I enable the sensor in yaml:
2021-03-17 17:33:35 WARNING (MainThread) [homeassistant.loader] You are using a custom integration imap_attachment which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-03-17 17:33:35 WARNING (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'imap_attachment'. This will not be allowed in a future version of Home Assistant. Please report this to the maintainer of 'imap_attachment'
2021-03-17 17:33:35 ERROR (MainThread) [homeassistant.util.logging] Exception in async_discovery_message_received when handling msg on 'homeassistant/sensor/347538_status/config': '{"name":"Bedroom Amp status","stat_t":"tele/tasmota-bedroom_amp/HASS_STATE","avty_t":"tele/tasmota-bedroom_amp/LWT","pl_avail":"Online","pl_not_avail":"Offline","json_attr_t":"tele/tasmota-bedroom_amp/HASS_STATE","unit_of_meas":"%","val_tpl":"{{value_json['RSSI']}}","ic":"mdi:information-outline","uniq_id":"347538_status","dev":{"ids":["347538"],"name":"Bedroom Amp","mdl":"Sonoff S2X","sw":"9.1.0(tasmota)","mf":"Tasmota"}}'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/util/package.py", line 37, in is_installed
req = pkg_resources.Requirement.parse(package)
File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3139, in parse
req, = parse_requirements(s)
ValueError: not enough values to unpack (expected 1, got 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/mqtt/discovery.py", line 161, in async_discovery_message_received
await async_process_discovery_payload(component, discovery_id, payload)
File "/usr/src/homeassistant/homeassistant/components/mqtt/discovery.py", line 222, in async_process_discovery_payload
await hass.config_entries.async_forward_entry_setup(
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 895, in async_forward_entry_setup
result = await async_setup_component(self.hass, domain, self._hass_config)
File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component
return await setup_tasks[domain] # type: ignore
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 895, in async_forward_entry_setup
result = await async_setup_component(self.hass, domain, self._hass_config)
File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component
return await setup_tasks[domain] # type: ignore
File "/usr/src/homeassistant/homeassistant/helpers/discovery.py", line 195, in async_load_platform
setup_success = await setup.async_setup_component(hass, component, hass_config)
File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component
return await setup_tasks[domain] # type: ignore
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 895, in async_forward_entry_setup
result = await async_setup_component(self.hass, domain, self._hass_config)
File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component
return await setup_tasks[domain] # type: ignore
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 895, in async_forward_entry_setup
result = await async_setup_component(self.hass, domain, self._hass_config)
File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component
return await setup_tasks[domain] # type: ignore
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 895, in async_forward_entry_setup
result = await async_setup_component(self.hass, domain, self._hass_config)
File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component
return await setup_tasks[domain] # type: ignore
File "/usr/src/homeassistant/homeassistant/helpers/discovery.py", line 195, in async_load_platform
setup_success = await setup.async_setup_component(hass, component, hass_config)
File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component
return await setup_tasks[domain] # type: ignore
File "/usr/src/homeassistant/homeassistant/helpers/discovery.py", line 195, in async_load_platform
setup_success = await setup.async_setup_component(hass, component, hass_config)
File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component
return await setup_tasks[domain] # type: ignore
File "/usr/src/homeassistant/homeassistant/helpers/discovery.py", line 195, in async_load_platform
setup_success = await setup.async_setup_component(hass, component, hass_config)
File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component
return await setup_tasks[domain] # type: ignore
File "/usr/src/homeassistant/homeassistant/helpers/discovery.py", line 195, in async_load_platform
setup_success = await setup.async_setup_component(hass, component, hass_config)
File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component
return await setup_tasks[domain] # type: ignore
File "/usr/src/homeassistant/homeassistant/helpers/discovery.py", line 195, in async_load_platform
setup_success = await setup.async_setup_component(hass, component, hass_config)
File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component
return await setup_tasks[domain] # type: ignore
File "/usr/src/homeassistant/homeassistant/helpers/discovery.py", line 195, in async_load_platform
setup_success = await setup.async_setup_component(hass, component, hass_config)
File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component
return await setup_tasks[domain] # type: ignore
File "/usr/src/homeassistant/homeassistant/helpers/discovery.py", line 195, in async_load_platform
setup_success = await setup.async_setup_component(hass, component, hass_config)
File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component
return await setup_tasks[domain] # type: ignore
File "/usr/src/homeassistant/homeassistant/helpers/discovery.py", line 195, in async_load_platform
setup_success = await setup.async_setup_component(hass, component, hass_config)
File "/usr/src/homeassistant/homeassistant/setup.py", line 57, in async_setup_component
return await setup_tasks[domain] # type: ignore
File "/usr/src/homeassistant/homeassistant/setup.py", line 64, in async_setup_component
return await task # type: ignore
File "/usr/src/homeassistant/homeassistant/setup.py", line 174, in _async_setup_component
processed_config = await conf_util.async_process_component_config(
File "/usr/src/homeassistant/homeassistant/config.py", line 828, in async_process_component_config
p_integration = await async_get_integration_with_requirements(hass, p_name)
File "/usr/src/homeassistant/homeassistant/requirements.py", line 79, in async_get_integration_with_requirements
await async_process_requirements(
File "/usr/src/homeassistant/homeassistant/requirements.py", line 126, in async_process_requirements
if pkg_util.is_installed(req):
File "/usr/src/homeassistant/homeassistant/util/package.py", line 41, in is_installed
req = pkg_resources.Requirement.parse(urlparse(package).fragment)
File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3139, in parse
req, = parse_requirements(s)
ValueError: not enough values to unpack (expected 1, got 0)