Browse Source

alias attr parsing: added note regarding support for strings

Fabian Peter Hammerle 4 năm trước cách đây
mục cha
commit
41a67b20c6

+ 1 - 0
intertechno_cc1101_mqtt/__init__.py

@@ -25,6 +25,7 @@ def _parse_topic(
             _LOGGER.warning("unknown alias %r; ignoring message", topic_split[1])
             _LOGGER.warning("unknown alias %r; ignoring message", topic_split[1])
             return None, None
             return None, None
         try:
         try:
+            # accepting strings to support `{{ aliases_in_ansible_vault | to_nice_json }}`
             return int(alias_attrs["address"]), int(alias_attrs["button-index"])
             return int(alias_attrs["address"]), int(alias_attrs["button-index"])
         except KeyError:
         except KeyError:
             _LOGGER.error(
             _LOGGER.error(