Skip to content
Merged

0.62 #11921

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
88161cd
Avoid returning empty media_image_url string (#11557)
Jan 12, 2018
6918993
Fix state for trigger with forced updates (#11595)
emlove Jan 12, 2018
8a301c6
Concord232 alarm arm away fix (#11597)
rwa Jan 12, 2018
dacd7cd
Core support for hass.io calls & Bugfix check_config (#11571)
pvizeli Jan 12, 2018
cc23652
Fix Tahoma stop command for 2 types of shutters (#11588)
bakedraccoon Jan 12, 2018
b8e4c2f
Snips add say and say_actions services (new) (#11596)
todschmidt Jan 12, 2018
c036141
Pushbullet email support (fix) (#11590)
todschmidt Jan 12, 2018
0409192
Bugfix and cleanup for Rfxtrx (#11600)
Danielhiversen Jan 12, 2018
be31a86
Xiaomi lib upgrade (#11603)
Danielhiversen Jan 12, 2018
b854cdb
Upgrade yarl to 0.18.0 (#11609)
fabaff Jan 13, 2018
5656b0e
Upgrade keyring to 10.6.0 (#11608)
fabaff Jan 13, 2018
37427d0
Upgrad youtube_dl to 2017.12.31 (#11610)
fabaff Jan 13, 2018
5e81736
patch stop command (#11612)
bakedraccoon Jan 13, 2018
b2b836d
small sonos cleanup (#11607)
pvizeli Jan 13, 2018
e476b9d
Update Xiaomi Miio compontent broken URI (#11621)
keesschollaart81 Jan 13, 2018
2e08766
light/mqqt_json: allow brightness scaling (#11613)
jkoelker Jan 13, 2018
3e43f4e
Adding support for Lutron covers (#11602)
nickovs Jan 13, 2018
ea62ded
Update Pyarlo to 0.1.2 (#11626)
arsaboo Jan 13, 2018
5def6eb
Use kelvin/mireds correctly for setting iglo white (#11622)
jesserockz Jan 13, 2018
cdbf2f9
Hyperion: Add brightness, HDMI and effect support (#11543)
starkillerOG Jan 13, 2018
9d67d22
Fixes and enhancements for the Tahoma platform (#11547)
glpatcern Jan 13, 2018
c33b171
upgrade xiaomi lib (#11629)
Danielhiversen Jan 13, 2018
0550baa
Add templates to MQTT climate (#11623)
tinloaf Jan 14, 2018
028597f
Update CODEOWNERS
pvizeli Jan 14, 2018
688d706
Upgrade coinmarketcap to 4.1.2 (#11634)
fabaff Jan 14, 2018
f86b645
Merge branch 'master' into dev
fabaff Jan 15, 2018
3979387
Add Deconz support for Zigbee green power devices like Hue Tap (#11455)
Kane610 Jan 15, 2018
1ed0c7d
Bump dev to 0.62.0.dev0 (#11652)
fabaff Jan 15, 2018
079d403
Add ability to specify a sender in the clicksend notification (#11046)
heydonms Jan 15, 2018
5546ecd
Round values to one decimal (#11673)
covrig Jan 15, 2018
6b26154
Add basic mychevy component (#11409)
sdague Jan 15, 2018
bf3329e
update mypy commandline arguments (#11638)
benleb Jan 15, 2018
fdcf332
Add support for configuring jeelink RF parameters (#11620)
hthiery Jan 15, 2018
799e1f0
Wemo Dimmer Support (#10882)
angel12 Jan 15, 2018
c43eceb
add temperature controls to eph-ember (#11400)
ttroy50 Jan 15, 2018
56a2c58
Upgrade youtube_dl to 2018.01.14 (#11661)
fabaff Jan 15, 2018
b0860ce
Change line separator to LN (#11662)
fabaff Jan 15, 2018
d219f24
Upgrade sqlalchemy to 1.2.1 (#11666)
fabaff Jan 15, 2018
fb69620
Upgrade pylast to 2.1.0 (#11668)
fabaff Jan 15, 2018
ff32f90
Fix zha color probe (#11670)
rcloran Jan 15, 2018
a358174
Rfxtrx fix (#11678)
Danielhiversen Jan 15, 2018
8753469
Move several local services to their right domain (#11677)
amelchio Jan 15, 2018
9869252
Added extra arguments to onvif platform config (#11680)
karlkar Jan 16, 2018
632525f
Enable probot move (#11690)
fabaff Jan 16, 2018
dce079e
fixed not to include spaces or dots in attribute names (#11694)
olskar Jan 16, 2018
d5f63eb
Add attributes (#11698)
fabaff Jan 16, 2018
4a82606
Feature/fritzdect errorhandling (#11490)
BastianPoe Jan 16, 2018
3a00077
Tesla bug fix #11598 (#11707)
zabuldon Jan 16, 2018
94950cc
History order bugfix and opt-in option (#11686)
rwa Jan 16, 2018
5a26d4c
Fix purge with MariaDB / MySQL (#11713)
tinloaf Jan 16, 2018
abbc6a2
Merge branch 'master' into dev
balloob Jan 16, 2018
1f118c4
Update mold_indicator.py (#11715)
olskar Jan 17, 2018
020593d
Override default name for TP-Link devices (#11710)
DanNixon Jan 17, 2018
4ee2c31
Don't use None inside header (#11725)
pvizeli Jan 17, 2018
8703124
Add enable_output service to Yamaha platform (#11103)
postlund Jan 17, 2018
33fd9c7
Fix effects not appearing in UI due to missing attribute (#11738)
shortbloke Jan 17, 2018
7617b8a
Fix for None object access attempt (#11748)
karlkar Jan 18, 2018
e72fefa
Fixed universal media player templated source_select bug (issue #1098…
iliketoprogram14 Jan 18, 2018
aac01cb
Fix Tahoma device class (#11745)
bakedraccoon Jan 18, 2018
8bcaf83
Add deCONZ entities in a predicitive order (#11712)
Kane610 Jan 18, 2018
aad14b8
Xbox sensor - Extend error handling (#11637)
ReneNulschDE Jan 18, 2018
f5fba33
Upgrade netdisco (#11752)
balloob Jan 18, 2018
216075c
set default value for rfxtrx config (#11767)
Danielhiversen Jan 18, 2018
2df2f35
Round off exchange rate (#11765)
arsaboo Jan 18, 2018
5c474ec
Update icon (fixes #11744) (#11758)
fabaff Jan 18, 2018
46bbd78
Use localized forecast for openweathermap (#11770)
brainexe Jan 18, 2018
0859e38
Unit should be mph as that is what the metoffices datapoint API retur…
miawgogo Jan 18, 2018
536424b
Owntracks: Use bluetooth_le as source_type if beacon was used for loc…
cnrd Jan 18, 2018
526405c
Add a 'last' mode and attribute to min_max sensor (#11037)
markferry Jan 18, 2018
23b2ca5
Update header and make it less verbose (#11774)
fabaff Jan 18, 2018
8ca45ac
Added support for TekSavvy bandwidth sensor (#11186)
jpjodoin Jan 18, 2018
cf6f916
Fix for Neato D3 and D5 (#11775)
karlkar Jan 18, 2018
a963419
Axis discovery fails to save conf (#11769)
Kane610 Jan 18, 2018
ce9673b
Limit service description loading to a single thread (#11733)
amelchio Jan 19, 2018
0e1cc05
Snips: (change) Removed unknown intent speech response (#11776)
todschmidt Jan 19, 2018
48619c9
Implemented event_data_template (new) (#11057)
todschmidt Jan 19, 2018
7fe2daf
Fix PEP8 and PEP257 issues (#11780)
fabaff Jan 19, 2018
b1fd9da
Fix typos (#11781)
fabaff Jan 19, 2018
314582e
Support for performance mode on Rheem water heaters. (#11786)
Jan 19, 2018
b10fd17
Service for setting a fixed scene of Xiaomi MIIO lights (#10819)
syssi Jan 19, 2018
c48ef28
Homematic ip tilt covers (#11650)
Jan 19, 2018
b84e551
plant - check history for min_brightness (#9534)
ChristianKuehnel Jan 19, 2018
5de828d
add generic rollershutter agian, was missing in last merge (#11788)
philklei Jan 19, 2018
03a5d4e
Additional attributes and services of the Xiaomi Air Purifier introdu…
syssi Jan 19, 2018
4ceb132
flux led version 0.20 (#11791)
Danielhiversen Jan 19, 2018
2ca4bde
Hyperion: fix (#11793)
starkillerOG Jan 19, 2018
5ef7a8d
Fix sensibo function names (#11797)
andrey-git Jan 19, 2018
273db75
Always load yr picture from https (#11796)
andrey-git Jan 19, 2018
d5df1c0
Make Google TTS secure (#11031)
PRabahy Jan 19, 2018
d697e8e
Correct inadvertent change to file permissions (#11755)
shortbloke Jan 19, 2018
51dd9b6
Fix recorder purge (#11802)
tinloaf Jan 19, 2018
51c41ba
Disable installing Telldus in Docker (#11806)
balloob Jan 19, 2018
c1b0ab7
Update frontend to 20180119.0
balloob Jan 19, 2018
7cbe017
Nad (#11800)
robhuls Jan 20, 2018
f744467
bump roku version (#11816)
soberstadt Jan 20, 2018
323992e
MiFlora - use bluepy on linux systems (#11284)
ChristianKuehnel Jan 20, 2018
e02d5e7
Ihc component and platforms (#10916)
dingusdk Jan 20, 2018
f7b129d
Change telldus domain to download.telldus.com (#11825)
michaelarnauts Jan 20, 2018
a470cc2
Add more workday sensor countries and update holidays library to vers…
drndos Jan 20, 2018
2cfbd0d
Add missing availability schema to MQTT alarm panel (#11829)
DanNixon Jan 20, 2018
dd81af4
python-miio version bumped. Fixes all xiaomi_miio components. (Closes…
syssi Jan 20, 2018
8c78a21
Add waterfurnace platform (#11732)
sdague Jan 20, 2018
0100f87
(Re)Enable Daikin autodiscovery (#11842)
rofrantz Jan 21, 2018
47e31dc
Fixes for PEP257 (#11810)
fabaff Jan 21, 2018
1a789a0
bump eq3bt version (#11834)
rytilahti Jan 21, 2018
6a6ea26
Fix Unifi direct errors caused by AP reboot. (#11835)
Jan 21, 2018
5513ffc
Change 'on' to 'heat' as fallback thermostat mode (#11377)
andrewdolphin Jan 21, 2018
0f26ebe
Use strict timeout when polling Samsung TV (Fix for #6375) (#11759)
kennedyshead Jan 22, 2018
c8d26d9
Fix issues with generic thermostat (#11805)
ciotlosm Jan 22, 2018
8c627e2
maxcube: Set MAX! Window Sensor's class to 'window' (#11799)
leppa Jan 22, 2018
b224fd3
Fix new iframe panel url (#11850)
pvizeli Jan 22, 2018
d478517
Fix races on recorder test (#11857)
sdague Jan 22, 2018
183e054
Clean up entity component (#11691)
balloob Jan 23, 2018
bc13c9d
Allow exposing sensors as temperature or humidity 'climate' devices t…
rofrantz Jan 23, 2018
09e3bf9
BME680 Sensor Component (#11695)
arcsur Jan 23, 2018
95592d9
Respond to Alexa scene activation correctly (#11869)
bitglue Jan 23, 2018
3417c6a
Checking Xiaomi Aqara devices unavailability states (#11631)
PaulAnnekov Jan 23, 2018
6df1fae
Hass.io panel v2 (#11860)
pvizeli Jan 23, 2018
73fa76d
Add missing mock call for test_minimal_config (#11858)
sdague Jan 23, 2018
990e076
Expose Alexa Smart Home via HTTP POST (#11859)
bitglue Jan 23, 2018
eea7e2f
fixed async function called in a thread (#11882)
PaulAnnekov Jan 23, 2018
9a3895c
upgrade ecobee (#11878)
nkgilley Jan 23, 2018
8f083e1
Fix for hive aux_heat target temperature display (#11884)
Rendili Jan 24, 2018
4521d59
Bump waterfurnace library to 0.3.0 (#11888)
sdague Jan 24, 2018
5b0a475
Postpone "Z-wave not ready" warning (#11807)
amelchio Jan 24, 2018
676c95e
[SMALL-PR] Don't make climate calls if feature is not supported (#11841)
rofrantz Jan 24, 2018
b43b542
Handle Daikin AC adapters without fan mode and swing mode support (#1…
rofrantz Jan 24, 2018
d65ac74
device tracker - tomato https support (#11566)
GregoryDosh Jan 24, 2018
a0a001d
Bme680 (#11892)
arcsur Jan 24, 2018
becd94f
Add android option for linux_battery.py (#11852)
mu4yu3 Jan 24, 2018
ffe8327
Pushbullet (fix) invalid keyword, added unittests (#11804)
todschmidt Jan 24, 2018
27edbe5
Snips - (fix) removed endSession mqtt response on error and unknown i…
todschmidt Jan 25, 2018
9123dfc
Clarify emulated hue warning (#11910)
balloob Jan 25, 2018
3d9ff37
Use API to discover Hue if no bridges specified (#11909)
balloob Jan 25, 2018
5123487
Update python-wink version and multiple wink fixes/updates. (#11833)
Jan 25, 2018
72bb0e9
New venstar climate component (#11639)
Cinntax Jan 25, 2018
0db9c04
Iota wallet (#11398)
jinnerbichler Jan 25, 2018
502ebd2
Improve foscam library exception support (#11701)
i-am-shodan Jan 25, 2018
94e270f
Added Xeoma camera platform (#11619)
jeradM Jan 25, 2018
caa16da
Multi-Room Support for Greenwave Reality (#11364)
dfiel Jan 25, 2018
3aa3130
Minor fix to configuration validation and related log line. (#11898)
arcsur Jan 26, 2018
920f9f1
Report scripts and groups as scenes to Alexa (#11900)
bitglue Jan 26, 2018
9a71717
Add ERC20 tokens to etherscan.io sensor (#11916)
nkgilley Jan 26, 2018
748fff7
Allow separate command and state OIDs and payloads in SNMP switch (#1…
nkaminski Jan 26, 2018
a8ee11e
Version 0.62
balloob Jan 26, 2018
3d8e425
Update frontend to 20180126.0
balloob Jan 26, 2018
df24ecf
Add "write" service to system_log (#11901)
andrey-git Jan 26, 2018
280c160
fixes #11848 (#11915)
kennedyshead Jan 26, 2018
07b2f38
Allow setting climate devices to AUTO mode via Google Assistant (#11923)
balloob Jan 26, 2018
abde8c4
Fixed rfxtrx binary_sensor KeyError on missing optional device_class …
basschipper Jan 26, 2018
7bbef68
Implement Alexa temperature sensors (#11930)
bitglue Jan 26, 2018
af69a30
Update pyhomematic to 0.1.38 (#11936)
danielperna84 Jan 26, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 16 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ omit =
homeassistant/components/homematic/__init__.py
homeassistant/components/*/homematic.py

homeassistant/components/ihc/*
homeassistant/components/*/ihc.py

homeassistant/components/insteon_local.py
homeassistant/components/*/insteon_local.py

Expand All @@ -106,6 +109,9 @@ omit =
homeassistant/components/ios.py
homeassistant/components/*/ios.py

homeassistant/components/iota.py
homeassistant/components/*/iota.py

homeassistant/components/isy994.py
homeassistant/components/*/isy994.py

Expand Down Expand Up @@ -145,6 +151,9 @@ omit =
homeassistant/components/modbus.py
homeassistant/components/*/modbus.py

homeassistant/components/mychevy.py
homeassistant/components/*/mychevy.py

homeassistant/components/mysensors.py
homeassistant/components/*/mysensors.py

Expand Down Expand Up @@ -241,6 +250,9 @@ omit =
homeassistant/components/volvooncall.py
homeassistant/components/*/volvooncall.py

homeassistant/components/waterfurnace.py
homeassistant/components/*/waterfurnace.py

homeassistant/components/*/webostv.py

homeassistant/components/wemo.py
Expand Down Expand Up @@ -304,6 +316,7 @@ omit =
homeassistant/components/camera/ring.py
homeassistant/components/camera/rpi_camera.py
homeassistant/components/camera/synology.py
homeassistant/components/camera/xeoma.py
homeassistant/components/camera/yi.py
homeassistant/components/climate/econet.py
homeassistant/components/climate/ephember.py
Expand All @@ -318,6 +331,7 @@ omit =
homeassistant/components/climate/radiotherm.py
homeassistant/components/climate/sensibo.py
homeassistant/components/climate/touchline.py
homeassistant/components/climate/venstar.py
homeassistant/components/cover/garadget.py
homeassistant/components/cover/homematic.py
homeassistant/components/cover/knx.py
Expand All @@ -327,7 +341,6 @@ omit =
homeassistant/components/cover/scsgate.py
homeassistant/components/device_tracker/actiontec.py
homeassistant/components/device_tracker/aruba.py
homeassistant/components/device_tracker/asuswrt.py
homeassistant/components/device_tracker/automatic.py
homeassistant/components/device_tracker/bbox.py
homeassistant/components/device_tracker/bluetooth_le_tracker.py
Expand Down Expand Up @@ -504,6 +517,7 @@ omit =
homeassistant/components/sensor/bitcoin.py
homeassistant/components/sensor/blockchain.py
homeassistant/components/sensor/bme280.py
homeassistant/components/sensor/bme680.py
homeassistant/components/sensor/bom.py
homeassistant/components/sensor/broadlink.py
homeassistant/components/sensor/buienradar.py
Expand Down Expand Up @@ -606,6 +620,7 @@ omit =
homeassistant/components/sensor/sytadin.py
homeassistant/components/sensor/tank_utility.py
homeassistant/components/sensor/ted5000.py
homeassistant/components/sensor/teksavvy.py
homeassistant/components/sensor/temper.py
homeassistant/components/sensor/tibber.py
homeassistant/components/sensor/time_date.py
Expand Down
13 changes: 13 additions & 0 deletions .github/move.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Configuration for move-issues - https://github.com/dessant/move-issues

# Delete the command comment. Ignored when the comment also contains other content
deleteCommand: true
# Close the source issue after moving
closeSourceIssue: true
# Lock the source issue after moving
lockSourceIssue: false
# Set custom aliases for targets
# aliases:
# r: repo
# or: owner/repo

3 changes: 3 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@ homeassistant/components/zone.py @home-assistant/core
# To monitor non-pypi additions
requirements_all.txt @andrey-git

# HomeAssistant developer Teams
Dockerfile @home-assistant/docker
virtualization/Docker/* @home-assistant/docker

homeassistant/components/zwave/* @home-assistant/z-wave
homeassistant/components/*/zwave.py @home-assistant/z-wave

homeassistant/components/hassio.py @home-assistant/hassio

# Indiviudal components
homeassistant/components/alarm_control_panel/egardia.py @jeroenterheerdt
homeassistant/components/camera/yi.py @bachya
Expand Down
56 changes: 21 additions & 35 deletions homeassistant/components/ads/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"""
ADS Component.
Support for Automation Device Specification (ADS).

For more details about this component, please refer to the documentation.
https://home-assistant.io/components/ads/

"""
import threading
import struct
Expand All @@ -29,7 +28,6 @@

DOMAIN = 'ads'

# config variable names
CONF_ADS_VAR = 'adsvar'
CONF_ADS_VAR_BRIGHTNESS = 'adsvar_brightness'
CONF_ADS_TYPE = 'adstype'
Expand All @@ -47,10 +45,10 @@
}, extra=vol.ALLOW_EXTRA)

SCHEMA_SERVICE_WRITE_DATA_BY_NAME = vol.Schema({
vol.Required(CONF_ADS_TYPE):
vol.In([ADSTYPE_INT, ADSTYPE_UINT, ADSTYPE_BYTE]),
vol.Required(CONF_ADS_VALUE): cv.match_all,
vol.Required(CONF_ADS_VAR): cv.string,
vol.Required(CONF_ADS_TYPE): vol.In([ADSTYPE_INT, ADSTYPE_UINT,
ADSTYPE_BYTE]),
vol.Required(CONF_ADS_VALUE): cv.match_all
})


Expand All @@ -59,15 +57,12 @@ def setup(hass, config):
import pyads
conf = config[DOMAIN]

# get ads connection parameters from config
net_id = conf.get(CONF_DEVICE)
ip_address = conf.get(CONF_IP_ADDRESS)
port = conf.get(CONF_PORT)

# create a new ads connection
client = pyads.Connection(net_id, port, ip_address)

# add some constants to AdsHub
AdsHub.ADS_TYPEMAP = {
ADSTYPE_BOOL: pyads.PLCTYPE_BOOL,
ADSTYPE_BYTE: pyads.PLCTYPE_BYTE,
Expand All @@ -81,16 +76,13 @@ def setup(hass, config):
AdsHub.PLCTYPE_UINT = pyads.PLCTYPE_UINT
AdsHub.ADSError = pyads.ADSError

# connect to ads client and try to connect
try:
ads = AdsHub(client)
except pyads.pyads.ADSError:
_LOGGER.error(
'Could not connect to ADS host (netid=%s, port=%s)', net_id, port
)
"Could not connect to ADS host (netid=%s, port=%s)", net_id, port)
return False

# add ads hub to hass data collection, listen to shutdown
hass.data[DATA_ADS] = ads
hass.bus.listen(EVENT_HOMEASSISTANT_STOP, ads.shutdown)

Expand All @@ -107,43 +99,41 @@ def handle_write_data_by_name(call):

hass.services.register(
DOMAIN, SERVICE_WRITE_DATA_BY_NAME, handle_write_data_by_name,
schema=SCHEMA_SERVICE_WRITE_DATA_BY_NAME
)
schema=SCHEMA_SERVICE_WRITE_DATA_BY_NAME)

return True


# tuple to hold data needed for notification
# Tuple to hold data needed for notification
NotificationItem = namedtuple(
'NotificationItem', 'hnotify huser name plc_datatype callback'
)


class AdsHub:
"""Representation of a PyADS connection."""
class AdsHub(object):
"""Representation of an ADS connection."""

def __init__(self, ads_client):
"""Initialize the ADS Hub."""
"""Initialize the ADS hub."""
self._client = ads_client
self._client.open()

# all ADS devices are registered here
# All ADS devices are registered here
self._devices = []
self._notification_items = {}
self._lock = threading.Lock()

def shutdown(self, *args, **kwargs):
"""Shutdown ADS connection."""
_LOGGER.debug('Shutting down ADS')
_LOGGER.debug("Shutting down ADS")
for notification_item in self._notification_items.values():
self._client.del_device_notification(
notification_item.hnotify,
notification_item.huser
)
_LOGGER.debug(
'Deleting device notification %d, %d',
notification_item.hnotify, notification_item.huser
)
"Deleting device notification %d, %d",
notification_item.hnotify, notification_item.huser)
self._client.close()

def register_device(self, device):
Expand All @@ -167,33 +157,30 @@ def add_device_notification(self, name, plc_datatype, callback):

with self._lock:
hnotify, huser = self._client.add_device_notification(
name, attr, self._device_notification_callback
)
name, attr, self._device_notification_callback)
hnotify = int(hnotify)

_LOGGER.debug(
'Added Device Notification %d for variable %s', hnotify, name
)
"Added device notification %d for variable %s", hnotify, name)

self._notification_items[hnotify] = NotificationItem(
hnotify, huser, name, plc_datatype, callback
)
hnotify, huser, name, plc_datatype, callback)

def _device_notification_callback(self, addr, notification, huser):
"""Handle device notifications."""
contents = notification.contents

hnotify = int(contents.hNotification)
_LOGGER.debug('Received Notification %d', hnotify)
_LOGGER.debug("Received notification %d", hnotify)
data = contents.data

try:
notification_item = self._notification_items[hnotify]
except KeyError:
_LOGGER.debug('Unknown Device Notification handle: %d', hnotify)
_LOGGER.debug("Unknown device notification handle: %d", hnotify)
return

# parse data to desired datatype
# Parse data to desired datatype
if notification_item.plc_datatype == self.PLCTYPE_BOOL:
value = bool(struct.unpack('<?', bytearray(data)[:1])[0])
elif notification_item.plc_datatype == self.PLCTYPE_INT:
Expand All @@ -204,7 +191,6 @@ def _device_notification_callback(self, addr, notification, huser):
value = struct.unpack('<H', bytearray(data)[:2])[0]
else:
value = bytearray(data)
_LOGGER.warning('No callback available for this datatype.')
_LOGGER.warning("No callback available for this datatype")

# execute callback
notification_item.callback(notification_item.name, value)
18 changes: 9 additions & 9 deletions homeassistant/components/alarm_control_panel/abode.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"""
import logging

from homeassistant.components.abode import (
AbodeDevice, DOMAIN as ABODE_DOMAIN, CONF_ATTRIBUTION)
from homeassistant.components.alarm_control_panel import (AlarmControlPanel)
from homeassistant.const import (ATTR_ATTRIBUTION, STATE_ALARM_ARMED_AWAY,
STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED)

from homeassistant.components.abode import CONF_ATTRIBUTION, AbodeDevice
from homeassistant.components.abode import DOMAIN as ABODE_DOMAIN
from homeassistant.components.alarm_control_panel import AlarmControlPanel
from homeassistant.const import (
ATTR_ATTRIBUTION, STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME,
STATE_ALARM_DISARMED)

DEPENDENCIES = ['abode']

Expand All @@ -21,7 +21,7 @@


def setup_platform(hass, config, add_devices, discovery_info=None):
"""Set up a sensor for an Abode device."""
"""Set up an alarm control panel for an Abode device."""
data = hass.data[ABODE_DOMAIN]

alarm_devices = [AbodeAlarm(data, data.abode.get_alarm(), data.name)]
Expand All @@ -41,7 +41,7 @@ def __init__(self, data, device, name):

@property
def icon(self):
"""Return icon."""
"""Return the icon."""
return ICON

@property
Expand Down Expand Up @@ -81,5 +81,5 @@ def device_state_attributes(self):
ATTR_ATTRIBUTION: CONF_ATTRIBUTION,
'device_id': self._device.device_id,
'battery_backup': self._device.battery,
'cellular_backup': self._device.is_cellular
'cellular_backup': self._device.is_cellular,
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@
import voluptuous as vol

import homeassistant.components.alarm_control_panel as alarm
import homeassistant.helpers.config_validation as cv
from homeassistant.components.alarmdecoder import (
DATA_AD, SIGNAL_PANEL_MESSAGE)
from homeassistant.components.alarmdecoder import DATA_AD, SIGNAL_PANEL_MESSAGE
from homeassistant.const import (
ATTR_CODE, STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME,
STATE_ALARM_DISARMED, STATE_ALARM_TRIGGERED)
import homeassistant.helpers.config_validation as cv

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -67,6 +66,7 @@ def async_added_to_hass(self):
SIGNAL_PANEL_MESSAGE, self._message_callback)

def _message_callback(self, message):
"""Handle received messages."""
if message.alarm_sounding or message.fire_alarm:
self._state = STATE_ALARM_TRIGGERED
elif message.armed_away:
Expand Down Expand Up @@ -120,7 +120,7 @@ def device_state_attributes(self):
'entry_delay_off': self._entry_delay_off,
'programming_mode': self._programming_mode,
'ready': self._ready,
'zone_bypassed': self._zone_bypassed
'zone_bypassed': self._zone_bypassed,
}

def alarm_disarm(self, code=None):
Expand Down
Loading