-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MQTT discovery error on latest - Exception in async_discover when dispatching 'mqtt_discovery_new_sensor_mqtt #44
Comments
Going back to |
roof, that restart must have been why I didn't catch it in my dev box. Pushing fix now. |
Just installed Is this to be used in the same way as in the accurite2mqtt, where the config calls for: In other words, if I set it to 30 and no payloads are received for an entity for 30 seconds, it will go unavailable? Thank you for all your efforts on this - it's a great thing to have! |
Right yeah, that is so you could set a value and the sensor will to unknown after a set period. 0 disables it. I'll get it added to the config. Just too trying to go too fast. |
Hi @thejeffreystone
If I am not mistaken, you may have added ['expire_after'] to this add-on (from the Accurate version) that has no call in the config, but is reported as an error:
Exception in async_discover when dispatching 'mqtt_discovery_new_sensor_mqtt': ({'name': 'Bresser 7in1 43807 uv', 'unit_of_measurement': 'UV Index', 'value_template': '{{ value|int }}', 'state_topic': 'rtl_433/Bresser-7in1/43807/0/uv', 'unique_id': 'rtl433sensor43807uv', 'availability_topic': 'rtl_433/status', 'expire_after': 'null', 'last_reset': 'homeassistant.util.dt.utc_from_timestamp(0)', 'state_class': 'measurement', 'device': {'identifiers': '43807', 'name': '43807', 'model': '7in1', 'manufacturer': 'Bresser'}, 'platform': 'mqtt'},) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/mqtt/mixins.py", line 331, in async_discover config: DiscoveryInfoType = discovery_schema(discovery_payload) File "/usr/local/lib/python3.10/site-packages/voluptuous/validators.py", line 232, in call return self._exec((Schema(val) for val in self.validators), v) File "/usr/local/lib/python3.10/site-packages/voluptuous/validators.py", line 355, in _exec raise e if self.msg is None else AllInvalid(self.msg, path=path) File "/usr/local/lib/python3.10/site-packages/voluptuous/validators.py", line 351, in _exec v = func(v) File "/usr/local/lib/python3.10/site-packages/voluptuous/schema_builder.py", line 272, in call return self._compiled([], data) File "/usr/local/lib/python3.10/site-packages/voluptuous/schema_builder.py", line 818, in validate_callable return schema(data) File "/usr/local/lib/python3.10/site-packages/voluptuous/schema_builder.py", line 272, in call return self._compiled([], data) File "/usr/local/lib/python3.10/site-packages/voluptuous/schema_builder.py", line 595, in validate_dict return base_validate(path, iteritems(data), out) File "/usr/local/lib/python3.10/site-packages/voluptuous/schema_builder.py", line 433, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: expected int for dictionary value @ data['expire_after']
Could you advise what to do in this situation?
I was trying to add it manual in yaml config, to see if it's going to be a workaround for the moment, but this didn't work.
Thank you in advance!!
The text was updated successfully, but these errors were encountered: