Skip to content

Commit

Permalink
Merge branch 'release/0.0.21'
Browse files Browse the repository at this point in the history
  • Loading branch information
dmulcahey committed Aug 21, 2019
2 parents 0d8a7a4 + 5e33934 commit a41eea2
Show file tree
Hide file tree
Showing 15 changed files with 421 additions and 29 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Custom quirks implementations for zigpy implemented as ZHA Device Handlers are a
- [Motion Sensor](https://www.irisbylowes.com/support/?guideTitle=Iris-Motion-Sensor&guideId=4be71b61-5938-30b6-8154-bd90cb9b4796): CentraLite 3326-L
- [Contact Sensor](http://a.co/9PCEorM): CentraLite 3321-S
- [Temperature / Humidity Sensor](https://bit.ly/2GYguGR): CentraLite 3310-S
- [Smart Button](http://pdf.lowes.com/useandcareguides/812489023018_use.pdf): CentraLite 3460-L
- [Thermostat](https://centralite.com/products/pearl-thermostat): CentraLite 3157100

### Xiaomi Aqara
- [Cube](https://www.aqara.com/en/cube_controller-product.html): lumi.sensor_cube.aqgl01
Expand All @@ -47,10 +49,17 @@ Custom quirks implementations for zigpy implemented as ZHA Device Handlers are a
### Lutron
- [Connected Bulb Remote](https://www.lutron.com/TechnicalDocumentLibrary/040421_Zigbee_Programming_Guide.pdf): Lutron LZL4BWHL01 Remote

### WAXMANN
- [Water Sensor](https://leaksmart.com/sensor/): leakSMART Water Sensor V2

### Digi
- [XBee Series 2](https://www.digi.com/products/embedded-systems/rf-modules/2-4-ghz-modules/xbee-zigbee): xbee
- [XBee Series 3](https://www.digi.com/products/embedded-systems/rf-modules/2-4-ghz-modules/xbee3-zigbee-3): xbee3

### Yale
- [YRD210](https://www.yalehome.com/Yale/Yale%20US/Real%20Living/installation%20instructions/Yale%20DB%20PUSH%20Quickstart%2018JUL11_Rev%20B.pdf): Yale YRD210 Deadbolt
- [YRL220](https://www.yalehome.com/Yale/Yale%20US/Real%20Living/installation%20instructions/Yale%20%20DB%20Touch%20Instructions%2023AUG11_Rev%20B.pdf): Yale YRL220 Lock

# Configuration:

1. Update Home Assistant to 0.85.1 or a later version.
Expand Down Expand Up @@ -92,6 +101,10 @@ Custom quirks implementations for zigpy implemented as ZHA Device Handlers are a

- Connected bulb remote publishes events to Home Assistant

### WAXMANN

- leakSMART water sensor is exposed as a binary_sensor with DEVICE_CLASS_MOISTURE

### Digi XBee

- Some functionality requires a coordinator device to be XBee as well
Expand Down Expand Up @@ -122,6 +135,10 @@ automation:
args: Assistant
```

### Yale

- All supported devices report battery level

### Thanks

- Special thanks to damarco for the majority of the device tracker code
Expand Down
2 changes: 1 addition & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ expected-line-ending-format=LF
overgeneral-exceptions=Exception

[BASIC]
good-names=3321S, 3130, 3300S, 3310S, 3305S, mot003V0, mot003V6
good-names=3321S, 3130, 3300S, 3310S, 3305S, 3460L, 3157100, mot003V0, mot003V6

[CLASSES]
exclude-protected=_DEVICE_REGISTRY
20 changes: 8 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

from setuptools import find_packages, setup

VERSION = "0.0.20"
VERSION = "0.0.21"


def readme():
"""Print long description."""
with open('README.md') as f:
with open("README.md") as f:
return f.read()


Expand All @@ -16,18 +16,14 @@ def readme():
version=VERSION,
description="Library implementing Zigpy quirks for ZHA in Home Assistant",
long_description=readme(),
long_description_content_type='text/markdown',
long_description_content_type="text/markdown",
url="https://github.com/dmulcahey/zha-device-handlers",
author="David F. Mulcahey",
author_email="[email protected]",
license="Apache License Version 2.0",
keywords='zha quirks homeassistant hass',
packages=find_packages(exclude=['*.tests']),
python_requires='>=3',
install_requires=[
'zigpy-homeassistant>=0.6.1'
],
tests_require=[
'pytest',
]
keywords="zha quirks homeassistant hass",
packages=find_packages(exclude=["*.tests"]),
python_requires=">=3",
install_requires=["zigpy-homeassistant>=0.6.1"],
tests_require=["pytest"],
)
69 changes: 69 additions & 0 deletions zhaquirks/centralite/3157100.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
"""Device handler for centralite 3157100."""
from zigpy.profiles import zha
from zigpy.quirks import CustomDevice
from zigpy.zcl.clusters.general import (
Basic, Identify, Ota, Time, PollControl)
from zigpy.zcl.clusters.hvac import (
Fan, Thermostat, UserInterface)

from zhaquirks.centralite import PowerConfigurationCluster

DIAGNOSTICS_CLUSTER_ID = 0x0B05 # decimal = 2821


class CentraLite3157100(CustomDevice):
"""Custom device representing centralite 3157100."""

signature = {
# <SimpleDescriptor endpoint=1 profile=260 device_type=769
# device_version=0
# input_clusters=[0, 1, 3, 513, 514, 516, 32, 2821]
# output_clusters=[10, 25]>

'models_info': [
('Centralite', '3157100')
],
'endpoints': {
1: {
'profile_id': zha.PROFILE_ID,
'device_type': zha.DeviceType.THERMOSTAT,
'input_clusters': [
Basic.cluster_id,
PowerConfigurationCluster.cluster_id,
Identify.cluster_id,
Thermostat.cluster_id,
Fan.cluster_id,
UserInterface.cluster_id,
PollControl.cluster_id,
DIAGNOSTICS_CLUSTER_ID
],
'output_clusters': [
Time.cluster_id,
Ota.cluster_id
],
},
}
}

replacement = {
'endpoints': {
1: {
'profile_id': zha.PROFILE_ID,
'device_type': zha.DeviceType.THERMOSTAT,
'input_clusters': [
Basic.cluster_id,
PowerConfigurationCluster,
Identify.cluster_id,
Thermostat.cluster_id,
Fan.cluster_id,
UserInterface.cluster_id,
PollControl.cluster_id,
DIAGNOSTICS_CLUSTER_ID
],
'output_clusters': [
Time.cluster_id,
Ota.cluster_id
],
},
},
}
23 changes: 23 additions & 0 deletions zhaquirks/centralite/3305S.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,26 @@ class CentraLite3305S(CustomDevice):
}
},
}


class CentraLite3305S2(CentraLite3305S):
"""Custom device representing centralite 3305 with one endpoint."""

signature = {
'models_info': [
('CentraLite', '3305'),
],
'endpoints': {
1: {
**CentraLite3305S.signature['endpoints'][1]
}
}
}

replacement = {
'endpoints': {
1: {
**CentraLite3305S.replacement['endpoints'][1]
}
}
}
66 changes: 66 additions & 0 deletions zhaquirks/centralite/3460L.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
"""Device handler for centralite 3460L."""
# pylint disable=C0103
from zigpy.profiles import zha
from zigpy.quirks import CustomDevice
from zigpy.zcl.clusters.general import (
Basic, Identify, OnOff, OnOffConfiguration, Ota, PollControl)
from zigpy.zcl.clusters.measurement import TemperatureMeasurement

from zhaquirks.centralite import PowerConfigurationCluster

DIAGNOSTICS_CLUSTER_ID = 0x0B05 # decimal = 2821


class CentraLite3460L(CustomDevice):
"""Custom device representing centralite 3460L."""

signature = {
# <SimpleDescriptor endpoint=1 profile=260 device_type=6
# device_version=0
# input_clusters=[0, 1, 3, 7, 32, 1026, 2821]
# output_clusters=[3, 6, 25]>
'models_info': [
('CentraLite', '3460-L')
],
'endpoints': {
1: {
'profile_id': zha.PROFILE_ID,
'device_type': zha.DeviceType.REMOTE_CONTROL,
'input_clusters': [
Basic.cluster_id,
PowerConfigurationCluster.cluster_id,
Identify.cluster_id,
OnOffConfiguration.cluster_id,
PollControl.cluster_id,
TemperatureMeasurement.cluster_id,
DIAGNOSTICS_CLUSTER_ID
],
'output_clusters': [
Identify.cluster_id,
OnOff.cluster_id,
Ota.cluster_id
],
},
}
}

replacement = {
'endpoints': {
1: {
'input_clusters': [
Basic.cluster_id,
PowerConfigurationCluster,
Identify.cluster_id,
OnOffConfiguration.cluster_id,
PollControl.cluster_id,
TemperatureMeasurement.cluster_id,
DIAGNOSTICS_CLUSTER_ID
],
'output_clusters': [
Identify.cluster_id,
OnOff.cluster_id,
Ota.cluster_id
],
}
},
}
1 change: 1 addition & 0 deletions zhaquirks/philips/rwl021.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class BasicCluster(CustomCluster, Basic):
def __init__(self, *args, **kwargs):
"""Init."""
super().__init__(*args, **kwargs)
self.attributes = super().attributes.copy()
self.attributes.update({
0x0031: ('phillips', t.bitmap16),
})
Expand Down
2 changes: 1 addition & 1 deletion zhaquirks/sinope/thermostat.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class SinopeTechnologiesThermostatCluster(CustomCluster, Thermostat):
def __init__(self, *args, **kwargs):
"""Init method."""
super().__init__(*args, **kwargs)
self.attributes = Thermostat.attributes
self.attributes = Thermostat.attributes.copy()
self.attributes[0x0400] = ('set_occupancy', t.enum8)
self._attridx = {
attrname: attrid for attrid, (attrname, datatype)
Expand Down
1 change: 1 addition & 0 deletions zhaquirks/waxman/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Module for WAXMAN devices as remote sensors."""
Loading

0 comments on commit a41eea2

Please sign in to comment.