Skip to content

Commit

Permalink
Merge pull request smarthomeNG#931 from Morg42/z2m-1
Browse files Browse the repository at this point in the history
zigbee2mqtt: accept mixed case topics
  • Loading branch information
Morg42 authored Apr 14, 2024
2 parents dd31035 + 5f88453 commit 67cc0f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions zigbee2mqtt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
class Zigbee2Mqtt(MqttPlugin):
""" Main class of the Plugin. Does all plugin specific stuff and provides the update functions for the items """

PLUGIN_VERSION = '2.0.0'
PLUGIN_VERSION = '2.0.1'

def __init__(self, sh, **kwargs):
""" Initializes the plugin. """
Expand All @@ -58,7 +58,7 @@ def __init__(self, sh, **kwargs):
self.logger.info(f'Init {self.get_shortname()} plugin {self.PLUGIN_VERSION}')

# get the parameters for the plugin (as defined in metadata plugin.yaml):
self.z2m_base = self.get_parameter_value('base_topic').lower()
self.z2m_base = self.get_parameter_value('base_topic')
self.cycle = self.get_parameter_value('poll_period')
self.read_at_init = self.get_parameter_value('read_at_init')
self._z2m_gui = self.get_parameter_value('z2m_gui')
Expand Down Expand Up @@ -172,7 +172,7 @@ def parse_item(self, item):
self.logger.warning(f"parsed item {item} has no {Z2M_TOPIC} set, ignoring")
return

attr = self.get_iattr_value(item.conf, Z2M_ATTR).lower()
attr = self.get_iattr_value(item.conf, Z2M_ATTR)

if item.type() == 'bool':
bval = self.get_iattr_value(item.conf, Z2M_BVAL)
Expand Down
6 changes: 3 additions & 3 deletions zigbee2mqtt/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ plugin:
documentation: ''
support: https://knx-user-forum.de/forum/supportforen/smarthome-py/1856775-support-thread-f%C3%BCr-das-zigbee2mqtt-plugin

version: 2.0.0 # Plugin version
version: 2.0.1 # Plugin version
sh_minversion: 1.9.5.6 # minimum shNG version to use this plugin
# sh_maxversion: # maximum shNG version to use this plugin (leave empty if latest)
py_minversion: 3.8 # minimum Python version to use for this plugin
multi_instance: True # plugin supports multi instance
restartable: True
multi_instance: true # plugin supports multi instance
restartable: true
classname: Zigbee2Mqtt # class containing the plugin

parameters:
Expand Down

0 comments on commit 67cc0f1

Please sign in to comment.