当前位置: 首页>>代码示例>>Python>>正文


Python ZWaveDeviceEntity.__init__方法代码示例

本文整理汇总了Python中homeassistant.components.zwave.ZWaveDeviceEntity.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python ZWaveDeviceEntity.__init__方法的具体用法?Python ZWaveDeviceEntity.__init__怎么用?Python ZWaveDeviceEntity.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在homeassistant.components.zwave.ZWaveDeviceEntity的用法示例。


在下文中一共展示了ZWaveDeviceEntity.__init__方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from homeassistant.components.zwave import ZWaveDeviceEntity [as 别名]
# 或者: from homeassistant.components.zwave.ZWaveDeviceEntity import __init__ [as 别名]
 def __init__(self, values, temp_unit):
     """Initialize the Z-Wave climate device."""
     ZWaveDeviceEntity.__init__(self, values, DOMAIN)
     self._target_temperature = None
     self._current_temperature = None
     self._current_operation = None
     self._operation_list = None
     self._operation_mapping = None
     self._operating_state = None
     self._current_fan_mode = None
     self._fan_list = None
     self._fan_state = None
     self._current_swing_mode = None
     self._swing_list = None
     self._unit = temp_unit
     _LOGGER.debug("temp_unit is %s", self._unit)
     self._zxt_120 = None
     # Make sure that we have values for the key before converting to int
     if (self.node.manufacturer_id.strip() and
             self.node.product_id.strip()):
         specific_sensor_key = (
             int(self.node.manufacturer_id, 16),
             int(self.node.product_id, 16))
         if specific_sensor_key in DEVICE_MAPPINGS:
             if DEVICE_MAPPINGS[specific_sensor_key] == WORKAROUND_ZXT_120:
                 _LOGGER.debug(
                     "Remotec ZXT-120 Zwave Thermostat workaround")
                 self._zxt_120 = 1
     self.update_properties()
开发者ID:EarthlingRich,项目名称:home-assistant,代码行数:31,代码来源:zwave.py

示例2: __init__

# 需要导入模块: from homeassistant.components.zwave import ZWaveDeviceEntity [as 别名]
# 或者: from homeassistant.components.zwave.ZWaveDeviceEntity import __init__ [as 别名]
    def __init__(self, value):
        """Initialize the zwave hvac."""
        from openzwave.network import ZWaveNetwork
        from pydispatch import dispatcher
        ZWaveDeviceEntity.__init__(self, value, DOMAIN)
        self._node = value.node
        self._target_temperature = None
        self._current_temperature = None
        self._current_operation = None
        self._operation_list = None
        self._current_operation_state = None
        self._current_fan_mode = None
        self._fan_list = None
        self._current_swing_mode = None
        self._swing_list = None
        self._unit = None
        self._zxt_120 = None
        self.update_properties()
        # register listener
        dispatcher.connect(
            self.value_changed, ZWaveNetwork.SIGNAL_VALUE_CHANGED)
        # Make sure that we have values for the key before converting to int
        if (value.node.manufacturer_id.strip() and
                value.node.product_id.strip()):
            specific_sensor_key = (int(value.node.manufacturer_id, 16),
                                   int(value.node.product_id, 16),
                                   value.index)

            if specific_sensor_key in DEVICE_MAPPINGS:
                if DEVICE_MAPPINGS[specific_sensor_key] == WORKAROUND_ZXT_120:
                    _LOGGER.debug("Remotec ZXT-120 Zwave Thermostat as HVAC")
                    self._zxt_120 = 1
开发者ID:dale3h,项目名称:homeassistant-config,代码行数:34,代码来源:hvac-zwave.py

示例3: __init__

# 需要导入模块: from homeassistant.components.zwave import ZWaveDeviceEntity [as 别名]
# 或者: from homeassistant.components.zwave.ZWaveDeviceEntity import __init__ [as 别名]
 def __init__(self, value):
     """Initialize the zwave garage door."""
     from openzwave.network import ZWaveNetwork
     from pydispatch import dispatcher
     ZWaveDeviceEntity.__init__(self, value, DOMAIN)
     self._state = value.data
     dispatcher.connect(
         self.value_changed, ZWaveNetwork.SIGNAL_VALUE_CHANGED)
开发者ID:12-hak,项目名称:hak-assistant,代码行数:10,代码来源:zwave.py

示例4: __init__

# 需要导入模块: from homeassistant.components.zwave import ZWaveDeviceEntity [as 别名]
# 或者: from homeassistant.components.zwave.ZWaveDeviceEntity import __init__ [as 别名]
    def __init__(self, value):
        """Initialize the zwave rollershutter."""
        from openzwave.network import ZWaveNetwork
        from pydispatch import dispatcher

        ZWaveDeviceEntity.__init__(self, value, DOMAIN)
        self._node = value.node
        dispatcher.connect(self.value_changed, ZWaveNetwork.SIGNAL_VALUE_CHANGED)
开发者ID:rhooper,项目名称:home-assistant,代码行数:10,代码来源:zwave.py

示例5: __init__

# 需要导入模块: from homeassistant.components.zwave import ZWaveDeviceEntity [as 别名]
# 或者: from homeassistant.components.zwave.ZWaveDeviceEntity import __init__ [as 别名]
    def __init__(self, sensor_value):
        from openzwave.network import ZWaveNetwork
        from pydispatch import dispatcher

        ZWaveDeviceEntity.__init__(self, sensor_value, DOMAIN)

        dispatcher.connect(
            self.value_changed, ZWaveNetwork.SIGNAL_VALUE_CHANGED)
开发者ID:100dayproject,项目名称:home-assistant,代码行数:10,代码来源:zwave.py

示例6: __init__

# 需要导入模块: from homeassistant.components.zwave import ZWaveDeviceEntity [as 别名]
# 或者: from homeassistant.components.zwave.ZWaveDeviceEntity import __init__ [as 别名]
    def __init__(self, value, sensor_class):
        self._sensor_type = sensor_class
        # pylint: disable=import-error
        from openzwave.network import ZWaveNetwork
        from pydispatch import dispatcher

        ZWaveDeviceEntity.__init__(self, value, DOMAIN)

        dispatcher.connect(
            self.value_changed, ZWaveNetwork.SIGNAL_VALUE_CHANGED)
开发者ID:alex1818,项目名称:home-assistant,代码行数:12,代码来源:zwave.py

示例7: __init__

# 需要导入模块: from homeassistant.components.zwave import ZWaveDeviceEntity [as 别名]
# 或者: from homeassistant.components.zwave.ZWaveDeviceEntity import __init__ [as 别名]
    def __init__(self, values):
        """Initialize the zwave rollershutter."""
        ZWaveDeviceEntity.__init__(self, values, DOMAIN)
        # pylint: disable=no-member
        self._open_id = None
        self._close_id = None
        self._current_position = None

        self._workaround = workaround.get_device_mapping(values.primary)
        if self._workaround:
            _LOGGER.debug("Using workaround %s", self._workaround)
        self.update_properties()
开发者ID:nunofgs,项目名称:home-assistant,代码行数:14,代码来源:zwave.py

示例8: __init__

# 需要导入模块: from homeassistant.components.zwave import ZWaveDeviceEntity [as 别名]
# 或者: from homeassistant.components.zwave.ZWaveDeviceEntity import __init__ [as 别名]
 def __init__(self, value):
     """Initialize the zwave rollershutter."""
     import libopenzwave
     from openzwave.network import ZWaveNetwork
     from pydispatch import dispatcher
     ZWaveDeviceEntity.__init__(self, value, DOMAIN)
     self._lozwmgr = libopenzwave.PyManager()
     self._lozwmgr.create()
     self._node = value.node
     self._current_position = None
     dispatcher.connect(
         self.value_changed, ZWaveNetwork.SIGNAL_VALUE_CHANGED)
开发者ID:hcchu,项目名称:home-assistant,代码行数:14,代码来源:zwave.py

示例9: __init__

# 需要导入模块: from homeassistant.components.zwave import ZWaveDeviceEntity [as 别名]
# 或者: from homeassistant.components.zwave.ZWaveDeviceEntity import __init__ [as 别名]
    def __init__(self, hass, values, invert_buttons):
        """Initialize the Z-Wave rollershutter."""
        ZWaveDeviceEntity.__init__(self, values, DOMAIN)
        self._network = hass.data[zwave.const.DATA_NETWORK]
        self._open_id = None
        self._close_id = None
        self._current_position = None
        self._invert_buttons = invert_buttons

        self._workaround = workaround.get_device_mapping(values.primary)
        if self._workaround:
            _LOGGER.debug("Using workaround %s", self._workaround)
        self.update_properties()
开发者ID:DavidMStraub,项目名称:home-assistant,代码行数:15,代码来源:zwave.py

示例10: __init__

# 需要导入模块: from homeassistant.components.zwave import ZWaveDeviceEntity [as 别名]
# 或者: from homeassistant.components.zwave.ZWaveDeviceEntity import __init__ [as 别名]
    def __init__(self, value):
        from openzwave.network import ZWaveNetwork
        from pydispatch import dispatcher

        ZWaveDeviceEntity.__init__(self, value, DOMAIN)

        self._brightness, self._state = brightness_state(value)

        # Used for value change event handling
        self._refreshing = False
        self._timer = None

        dispatcher.connect(
            self._value_changed, ZWaveNetwork.SIGNAL_VALUE_CHANGED)
开发者ID:FanaHOVA,项目名称:home-assistant,代码行数:16,代码来源:zwave.py

示例11: __init__

# 需要导入模块: from homeassistant.components.zwave import ZWaveDeviceEntity [as 别名]
# 或者: from homeassistant.components.zwave.ZWaveDeviceEntity import __init__ [as 别名]
 def __init__(self, value):
     """Initialize the zwave thermostat."""
     from openzwave.network import ZWaveNetwork
     from pydispatch import dispatcher
     ZWaveDeviceEntity.__init__(self, value, DOMAIN)
     self._node = value.node
     self._target_temperature = None
     self._current_temperature = None
     self._current_operation = STATE_IDLE
     self._current_operation_state = STATE_IDLE
     self._unit = None
     self.update_properties()
     # register listener
     dispatcher.connect(
         self.value_changed, ZWaveNetwork.SIGNAL_VALUE_CHANGED)
开发者ID:CaptFrank,项目名称:home-assistant,代码行数:17,代码来源:zwave.py

示例12: __init__

# 需要导入模块: from homeassistant.components.zwave import ZWaveDeviceEntity [as 别名]
# 或者: from homeassistant.components.zwave.ZWaveDeviceEntity import __init__ [as 别名]
    def __init__(self, value):
        """Initialize the zwave rollershutter."""
        ZWaveDeviceEntity.__init__(self, value, DOMAIN)
        # pylint: disable=no-member
        self._node = value.node
        self._open_id = None
        self._close_id = None
        self._current_position = None
        self._workaround = None
        if (value.node.manufacturer_id.strip() and
                value.node.product_id.strip()):
            specific_sensor_key = (int(value.node.manufacturer_id, 16),
                                   int(value.node.product_type, 16))

            if specific_sensor_key in DEVICE_MAPPINGS:
                if DEVICE_MAPPINGS[specific_sensor_key] == WORKAROUND:
                    _LOGGER.debug("Controller without positioning feedback")
                    self._workaround = 1
开发者ID:arjenfvellinga,项目名称:home-assistant,代码行数:20,代码来源:zwave.py

示例13: __init__

# 需要导入模块: from homeassistant.components.zwave import ZWaveDeviceEntity [as 别名]
# 或者: from homeassistant.components.zwave.ZWaveDeviceEntity import __init__ [as 别名]
    def __init__(self, value):
        """Initialize the zwave rollershutter."""
        import libopenzwave
        from openzwave.network import ZWaveNetwork
        from pydispatch import dispatcher

        ZWaveDeviceEntity.__init__(self, value, DOMAIN)
        self._lozwmgr = libopenzwave.PyManager()
        self._lozwmgr.create()
        self._node = value.node
        self._current_position = None
        self._workaround = None
        dispatcher.connect(self.value_changed, ZWaveNetwork.SIGNAL_VALUE_CHANGED)
        if value.node.manufacturer_id.strip() and value.node.product_id.strip():
            specific_sensor_key = (int(value.node.manufacturer_id, 16), int(value.node.product_type, 16))

            if specific_sensor_key in DEVICE_MAPPINGS:
                if DEVICE_MAPPINGS[specific_sensor_key] == WORKAROUND:
                    _LOGGER.debug("Controller without positioning feedback")
                    self._workaround = 1
开发者ID:heathbar,项目名称:home-assistant,代码行数:22,代码来源:zwave.py

示例14: __init__

# 需要导入模块: from homeassistant.components.zwave import ZWaveDeviceEntity [as 别名]
# 或者: from homeassistant.components.zwave.ZWaveDeviceEntity import __init__ [as 别名]
 def __init__(self, value):
     """Initialize the zwave garage door."""
     ZWaveDeviceEntity.__init__(self, value, DOMAIN)
开发者ID:Teagan42,项目名称:home-assistant,代码行数:5,代码来源:zwave.py


注:本文中的homeassistant.components.zwave.ZWaveDeviceEntity.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。