Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge insteon_plm and insteon_local to insteon component #16102

Merged
merged 51 commits into from Aug 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
f11a23a
Implement X10
teharris1 May 19, 2018
61370a2
Add X10 after add_device_callback
teharris1 May 19, 2018
5c3e296
Ref device by id not hex and add x10OnOffSwitch name
teharris1 May 19, 2018
1a80d73
Merge remote-tracking branch 'remote/dev' into x10
teharris1 May 22, 2018
0973bac
X10 services and add sensor device
teharris1 May 29, 2018
f4148cf
Correctly reference X10_HOUSECODE_SCHEMA
teharris1 May 29, 2018
a3b4aef
Log adding of X10 devices
teharris1 May 29, 2018
9035a23
Add X10 All Units Off, All Lights On and All Lights Off devices
teharris1 May 31, 2018
938f08d
Correct ref to X10 states vs devices
teharris1 May 31, 2018
dcd4ff8
Add X10 All Units Off, All Lights On and All Lights Off devices
teharris1 May 31, 2018
7887256
Correct X10 config
teharris1 May 31, 2018
60038d9
Debug x10 device additions
teharris1 May 31, 2018
868cd03
Config x10 from bool to housecode char
teharris1 May 31, 2018
d67d29d
Pass PLM to X10 device create
teharris1 May 31, 2018
7d4451f
Remove PLM to call to add_x10_device
teharris1 May 31, 2018
fff0518
Unconfuse x10 config and method names
teharris1 May 31, 2018
b71306f
Correct spelling of x10_all_lights_off_housecode
teharris1 May 31, 2018
ab7754a
Merge remote-tracking branch 'remote/dev' into x10
teharris1 Jun 1, 2018
247914d
Bump insteonplm to 0.10.0 to support X10
teharris1 Jun 1, 2018
733d803
Add host to config options
teharris1 Jun 4, 2018
b26308d
Add username and password to config for hub connectivity
teharris1 Jun 4, 2018
1eb9f1e
Add username and password to config for hub
teharris1 Jun 4, 2018
4f90a15
Convert port to int if host is defined
teharris1 Jun 4, 2018
81276ff
Merge remote-tracking branch 'remote/dev' into hub
teharris1 Jun 6, 2018
6645656
Merge remote-tracking branch 'remote/dev' into hub
teharris1 Jun 21, 2018
60d7b8f
Add KeypadLinc
teharris1 Jul 27, 2018
644def9
Merge remote-tracking branch 'remote/dev' into KeypadLinc
teharris1 Jul 27, 2018
4ec2cd7
Merge remote-tracking branch 'remote/dev' into hub
teharris1 Jul 29, 2018
e0964cd
Merge remote-tracking branch 'remote/dev' into KeypadLinc
teharris1 Jul 29, 2018
df750cb
Merge branch 'KeypadLinc' into hub
teharris1 Jul 29, 2018
59ea22d
Update config schema to require either port or host
teharris1 Jul 30, 2018
06241ae
Solidify Hub and PLM configuration to ensure proper settings
teharris1 Jul 31, 2018
1ca186d
Update hub schema
teharris1 Aug 3, 2018
6c30c43
Bump insteonplm version
teharris1 Aug 7, 2018
d9792c2
Merge remote-tracking branch 'remote/dev' into hub
teharris1 Aug 8, 2018
6fbd9b2
Fix pylint and flake issues
teharris1 Aug 8, 2018
cff37d4
Bump insteonplm to 0.12.1
teharris1 Aug 20, 2018
d6fdee9
Merge remote-tracking branch 'remote/dev' into hub
teharris1 Aug 20, 2018
67512c1
Merge insteon_plm and insteon_local to insteon
teharris1 Aug 20, 2018
e472a58
Rename insteon_plm to insteon
teharris1 Aug 21, 2018
319ef56
Merge remote-tracking branch 'remote/dev' into hub
teharris1 Aug 21, 2018
37e706c
Bump insteonplm to 0.12.2
teharris1 Aug 21, 2018
8027154
Flake8 cleanup
teharris1 Aug 21, 2018
2f3268a
Merge remote-tracking branch 'remote/dev' into hub
teharris1 Aug 21, 2018
6fef39b
Update .coveragerc for insteon_plm, insteon_local and insteon changes
teharris1 Aug 21, 2018
03fd4f4
Add persistent notification
teharris1 Aug 21, 2018
42f243e
Fix reference to insteon_plm
teharris1 Aug 21, 2018
4783a2c
Fix indentation
teharris1 Aug 21, 2018
3fc0f4d
Shorten message and fix grammer
teharris1 Aug 21, 2018
0da6a6d
Add comment to remove in release 0.90
teharris1 Aug 21, 2018
05cbf31
Hound fix
teharris1 Aug 21, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions .coveragerc
Expand Up @@ -136,12 +136,13 @@ omit =

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

homeassistant/components/insteon/*
homeassistant/components/*/insteon.py

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

homeassistant/components/insteon_plm/*
homeassistant/components/*/insteon_plm.py

homeassistant/components/insteon_plm.py

homeassistant/components/ios.py
homeassistant/components/*/ios.py
Expand Down
Expand Up @@ -2,15 +2,15 @@
Support for INSTEON dimmers via PowerLinc Modem.

For more details about this component, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.insteon_plm/
https://home-assistant.io/components/binary_sensor.insteon/
"""
import asyncio
import logging

from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.components.insteon_plm import InsteonPLMEntity
from homeassistant.components.insteon import InsteonEntity

DEPENDENCIES = ['insteon_plm']
DEPENDENCIES = ['insteon']

_LOGGER = logging.getLogger(__name__)

Expand All @@ -24,27 +24,27 @@

@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
"""Set up the INSTEON PLM device class for the hass platform."""
plm = hass.data['insteon_plm'].get('plm')
"""Set up the INSTEON device class for the hass platform."""
insteon_modem = hass.data['insteon'].get('modem')

address = discovery_info['address']
device = plm.devices[address]
device = insteon_modem.devices[address]
state_key = discovery_info['state_key']
name = device.states[state_key].name
if name != 'dryLeakSensor':
_LOGGER.debug('Adding device %s entity %s to Binary Sensor platform',
device.address.hex, device.states[state_key].name)

new_entity = InsteonPLMBinarySensor(device, state_key)
new_entity = InsteonBinarySensor(device, state_key)

async_add_devices([new_entity])


class InsteonPLMBinarySensor(InsteonPLMEntity, BinarySensorDevice):
class InsteonBinarySensor(InsteonEntity, BinarySensorDevice):
"""A Class for an Insteon device entity."""

def __init__(self, device, state_key):
"""Initialize the INSTEON PLM binary sensor."""
"""Initialize the INSTEON binary sensor."""
super().__init__(device, state_key)
self._sensor_type = SENSOR_TYPES.get(self._insteon_device_state.name)

Expand Down
Expand Up @@ -2,7 +2,7 @@
Support for INSTEON fans via PowerLinc Modem.

For more details about this component, please refer to the documentation at
https://home-assistant.io/components/fan.insteon_plm/
https://home-assistant.io/components/fan.insteon/
"""
import asyncio
import logging
Expand All @@ -14,9 +14,9 @@
FanEntity,
SUPPORT_SET_SPEED)
from homeassistant.const import STATE_OFF
from homeassistant.components.insteon_plm import InsteonPLMEntity
from homeassistant.components.insteon import InsteonEntity

DEPENDENCIES = ['insteon_plm']
DEPENDENCIES = ['insteon']

SPEED_TO_HEX = {SPEED_OFF: 0x00,
SPEED_LOW: 0x3f,
Expand All @@ -30,22 +30,22 @@

@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
"""Set up the INSTEON PLM device class for the hass platform."""
plm = hass.data['insteon_plm'].get('plm')
"""Set up the INSTEON device class for the hass platform."""
insteon_modem = hass.data['insteon'].get('modem')

address = discovery_info['address']
device = plm.devices[address]
device = insteon_modem.devices[address]
state_key = discovery_info['state_key']

_LOGGER.debug('Adding device %s entity %s to Fan platform',
device.address.hex, device.states[state_key].name)

new_entity = InsteonPLMFan(device, state_key)
new_entity = InsteonFan(device, state_key)

async_add_devices([new_entity])


class InsteonPLMFan(InsteonPLMEntity, FanEntity):
class InsteonFan(InsteonEntity, FanEntity):
"""An INSTEON fan component."""

@property
Expand Down
107 changes: 0 additions & 107 deletions homeassistant/components/fan/insteon_local.py

This file was deleted.