From 7b8d1a0ebb87b8d5a1b9e200406fe710e1e2480f Mon Sep 17 00:00:00 2001 From: Daniel Perna Date: Tue, 28 Nov 2017 21:58:59 +0100 Subject: [PATCH] Upgrade HomeMatic, add devices --- .../components/binary_sensor/homematic.py | 1 + homeassistant/components/homematic.py | 9 ++++---- homeassistant/components/sensor/homematic.py | 21 +++++++++++++++---- requirements_all.txt | 2 +- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/binary_sensor/homematic.py b/homeassistant/components/binary_sensor/homematic.py index 2f464bc73cc581..d85c10f9a34c82 100644 --- a/homeassistant/components/binary_sensor/homematic.py +++ b/homeassistant/components/binary_sensor/homematic.py @@ -25,6 +25,7 @@ 'RemoteMotion': None, 'WeatherSensor': None, 'TiltSensor': None, + 'PresenceIP': 'motion', } diff --git a/homeassistant/components/homematic.py b/homeassistant/components/homematic.py index 901b54c8525d97..5e8cd3dc58ed8d 100644 --- a/homeassistant/components/homematic.py +++ b/homeassistant/components/homematic.py @@ -21,7 +21,7 @@ from homeassistant.helpers.event import track_time_interval from homeassistant.config import load_yaml_config_file -REQUIREMENTS = ['pyhomematic==0.1.34'] +REQUIREMENTS = ['pyhomematic==0.1.35'] DOMAIN = 'homematic' @@ -56,7 +56,7 @@ HM_DEVICE_TYPES = { DISCOVER_SWITCHES: [ - 'Switch', 'SwitchPowermeter', 'IOSwitch', 'IPSwitch', + 'Switch', 'SwitchPowermeter', 'IOSwitch', 'IPSwitch', 'RFSiren', 'IPSwitchPowermeter', 'KeyMatic', 'HMWIOSwitch', 'Rain', 'EcoLogic'], DISCOVER_LIGHTS: ['Dimmer', 'KeyDimmer', 'IPKeyDimmer'], DISCOVER_SENSORS: [ @@ -66,7 +66,7 @@ 'WeatherStation', 'ThermostatWall2', 'TemperatureDiffSensor', 'TemperatureSensor', 'CO2Sensor', 'IPSwitchPowermeter', 'HMWIOSwitch', 'FillingLevel', 'ValveDrive', 'EcoLogic', 'IPThermostatWall', - 'IPSmoke'], + 'IPSmoke', 'RFSiren', 'PresenceIP'], DISCOVER_CLIMATE: [ 'Thermostat', 'ThermostatWall', 'MAXThermostat', 'ThermostatWall2', 'MAXWallThermostat', 'IPThermostat', 'IPThermostatWall', @@ -74,7 +74,8 @@ DISCOVER_BINARY_SENSORS: [ 'ShutterContact', 'Smoke', 'SmokeV2', 'Motion', 'MotionV2', 'RemoteMotion', 'WeatherSensor', 'TiltSensor', 'IPShutterContact', - 'HMWIOSwitch', 'MaxShutterContact', 'Rain', 'WiredSensor'], + 'HMWIOSwitch', 'MaxShutterContact', 'Rain', 'WiredSensor', + 'PresenceIP'], DISCOVER_COVER: ['Blind', 'KeyBlind'] } diff --git a/homeassistant/components/sensor/homematic.py b/homeassistant/components/sensor/homematic.py index 2edfe6648f3459..936533422bb7ca 100644 --- a/homeassistant/components/sensor/homematic.py +++ b/homeassistant/components/sensor/homematic.py @@ -13,10 +13,23 @@ DEPENDENCIES = ['homematic'] HM_STATE_HA_CAST = { - 'RotaryHandleSensor': {0: 'closed', 1: 'tilted', 2: 'open'}, - 'WaterSensor': {0: 'dry', 1: 'wet', 2: 'water'}, - 'CO2Sensor': {0: 'normal', 1: 'added', 2: 'strong'}, - 'IPSmoke': {0: 'off', 1: 'primary', 2: 'intrusion', 3: 'secondary'} + 'RotaryHandleSensor': {0: 'closed', + 1: 'tilted', + 2: 'open'}, + 'WaterSensor': {0: 'dry', + 1: 'wet', + 2: 'water'}, + 'CO2Sensor': {0: 'normal', + 1: 'added', + 2: 'strong'}, + 'IPSmoke': {0: 'off', + 1: 'primary', + 2: 'intrusion', + 3: 'secondary'}, + 'RFSiren': {0: 'disarmed', + 1: 'extsens_armed', + 2: 'allsens_armed', + 3: 'alarm_blocked'}, } HM_UNIT_HA_CAST = { diff --git a/requirements_all.txt b/requirements_all.txt index 5ea9d743a2c4e2..611bbfe4f4c071 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -674,7 +674,7 @@ pyhik==0.1.4 pyhiveapi==0.2.5 # homeassistant.components.homematic -pyhomematic==0.1.34 +pyhomematic==0.1.35 # homeassistant.components.sensor.hydroquebec pyhydroquebec==1.3.1