Commit Graph

514 Commits (ebe4c3902077b152db9896f97a4d681cf7d4fa0f)

Author SHA1 Message Date
William Scanlon a64726e321 Added assumed state to command_line switch 2016-03-17 10:41:26 -04:00
pavoni 4e7160139e Fix race condition in template components. 2016-03-17 12:10:19 +00:00
Greg Dowling fd27e4fc7d Merge pull request #1550 from balloob/restructure_vera
Refactor vera into a platform.
2016-03-16 09:28:27 +00:00
pavoni 9fc73fa644 Refactor vera into a platform. 2016-03-16 09:03:56 +00:00
bradsk88 8a6cc49438 Upgrading python-wink to 0.6.3
This corrects a bug where multi-sensors' internal states were rendered null when downloading state updates from the Wink API.
2016-03-14 19:16:54 -06:00
pavoni fe2adff017 Handle startup race condition. 2016-03-14 10:29:12 +00:00
Stefan Jonasson eb9ed5ccfe Rewrite of the tellstick module. It now uses a common base for all shared functionality.
The rewrite addresses a problem with the tellstick hardware dropping
commands when too many simultaneous calls is being made from HA. Also fixes a bug when the dim level was changed externally.
This breaks previous configurations.

The new config for tellstick is

```yaml
tellstick:
  signal_repetitions: X
```
Lights and Switches are detected automatically.
Sensors work like before because they do not share any functionality with the other devices and they also needs a complete other configuration.
2016-03-13 19:28:42 +01:00
Paulus Schoutsen 025713ee41 Type checks for MQTT config 2016-03-10 21:42:17 -08:00
Paulus Schoutsen b9856a2af5 Fix final pep257 issues 2016-03-09 23:34:38 -08:00
Fabian Affolter d6eab03a61 Remove parenthesis 2016-03-08 18:05:01 +01:00
Fabian Affolter 49ebc6d0b0 Fix PEP257 issues 2016-03-08 13:35:39 +01:00
pavoni 4e3c8a8697 Fix noisy error on startup. Make callbacks code consistent. 2016-03-06 19:19:07 +00:00
Stefan Jonasson e57eca517b Add assumed state for Tellstick devices.
Tellstick device states are always assumed so this should be set to true.
2016-03-05 10:24:22 +01:00
Paulus Schoutsen ec642cbeff Merge pull request #1450 from kk7ds/mfi-tls-verify
Give mFi options to control TLS usage
2016-02-29 19:18:06 -08:00
MartinHjelmare bfa579f8b2 Add assumed_state to mysensors switch and light
* Return true for assumed_state if optimistic config setting is true.
* Fix PEP257
2016-03-01 03:09:55 +01:00
Dan Smith be04ebf9ed Give mFi options to control TLS usage
The default configuration of the mFi controller generates self-signed
certificates which are valid for short periods of time, and which are
regnerated on start or as needed. This makes requests mad. Since most
people will be using the self-signed certificates anyway, add options
to let them choose non-TLS, or unverified connections if they want/need.

This bumps the mficlient requirement to 0.3.0 for proper handling of
verify=False.
2016-02-29 17:37:41 -08:00
Paulus Schoutsen be55ee059e Make names command line platform consistent 2016-02-27 15:56:35 -08:00
Paulus Schoutsen afb51d14b8 Merge pull request #1302 from persandstrom/vsure_maintenace
updated verisure reconnect
2016-02-27 14:50:24 -08:00
Per Sandström d7e3c6a442 verisure refactoring and fix reconnect 2016-02-27 21:50:19 +01:00
Daniel Høyer Iversen 278fdc0983 Merge pull request #1385 from balloob/rfxtrx
improve rfxtrx sensor
2016-02-26 10:49:10 +01:00
Greg Dowling 6dc49df2df Merge pull request #1405 from balloob/wemo_insight_updates
Fix typo in Wemo state_detail attribute.
2016-02-26 08:46:54 +00:00
pavoni b2d32114c8 Fix typo. 2016-02-26 08:28:17 +00:00
Paulus Schoutsen 6512b7d701 Merge pull request #1380 from w1ll1am23/wink_binary_sensor
Moved Wink binary sensors to a binary sensor class
2016-02-25 18:19:38 -08:00
Paulus Schoutsen dd45b5e0b1 Merge pull request #1402 from kk7ds/fix-mfi-connect-exception
Fix mFi error handling in setup_platform
2016-02-25 17:06:03 -08:00
pavoni ddbceebd65 Cast standby_state to int before testing. 2016-02-26 00:16:33 +00:00
Dan Smith 37e5b98919 Fix mFi error handling in setup_platform
The exception we were catching incorrectly referenced the client variable
in local scope instead of the module. Also, if we fail to connect we can
get a requests exception, so catch and handle that as well.
2016-02-25 15:52:13 -08:00
pavoni 86973226b1 Remove ghost comment. 2016-02-25 23:13:20 +00:00
pavoni 72144945b4 Move standby from state to attribute, add optimistic switch status. 2016-02-25 22:46:14 +00:00
William Scanlon 5a64ef2c98 Moved Wink binary sensors to a binary sensor class 2016-02-25 14:03:02 -05:00
Daniel 8ffa3684e3 rfxtrx refactor 2016-02-25 17:40:24 +01:00
Daniel 23db6e753f refactor rfxtrx code 2016-02-25 13:08:16 +01:00
Paulus Schoutsen 621a6e0ea0 Merge pull request #1395 from MartinHjelmare/fix-mysensors-switch-light
Fix mysensors switch & light types
2016-02-24 19:56:36 -08:00
MartinHjelmare 9c538d11c2 Fix mysensors switch & light types
* Move S_LIGHT and V_LIGHT from light back to switch platform, to avoid
  double devices showing.
* Remove MySensorsLightPlain class from light platform, since it's not
  needed anymore.
* A light switch with only a switch, ie no dimmer or
  RGB controls, will show as a regular switch device.
2016-02-25 00:48:29 +01:00
MartinHjelmare 2790ee0b02 Use get_component instead of importing component 2016-02-25 00:24:31 +01:00
Fabian Affolter 4563c54a3e Add link to docs and modify docstrings to match PEP257 2016-02-24 10:38:06 +01:00
Fabian Affolter 582394bc3b Modify import of template and PEP257 2016-02-23 21:19:22 +01:00
Jan Harkes afe564fb3f Move WeMo discovery into a common component 2016-02-21 22:23:00 -05:00
Jan Harkes 368ad93eb6 Only add discovered switches instead of any WeMo device. 2016-02-21 21:57:53 -05:00
Paulus Schoutsen c77266c544 Merge pull request #1357 from w1ll1am23/update_wink_for_binary_switch_fix
Updated wink version for binary switch fix
2016-02-21 13:50:59 -08:00
Paulus Schoutsen 070cee48a8 Merge pull request #1353 from balloob/assume-state
Add assumed_state to Group, MQTT Switch, MQTT Light
2016-02-21 09:19:54 -08:00
William Scanlon 3da554a198 Update wink version 2016-02-21 12:01:32 -05:00
Christian Fredborg Braedstrup 2f66528595 Added support for d-link W215 smart plug 2016-02-21 08:34:07 +01:00
Paulus Schoutsen 443b39bccd MQTT Switch to expose assumed_state if optimistic 2016-02-20 17:17:30 -08:00
MartinHjelmare 08aaea5444 Add mysensors binary sensor
* Add mysensors binary sensor.
* Add discovery platforms to binary_sensor base component.
* Replace device_state_attributes with state_attributes in
	binary_sensor base class.
* Fix docstrings.
* Add discovery of binary sensor to mysensors component.
* Add child.type as argument to mysensors device_class.
* Move binary sensor types from sensor to binary_sensor module.
* Fix binary_sensor attribute tests. Use state_attributes instead of
	device_state_attributes.
2016-02-20 04:28:17 +01:00
Paulus Schoutsen e80309c03c Fix imports (using isort) 2016-02-18 21:27:50 -08:00
Justyn Shull 9a740bff2a Return early from setup_platform when zwave NETWORK is not configured 2016-02-18 18:12:00 -06:00
pavoni 98d18c3060 Bump pywemo version. 2016-02-18 19:32:30 +00:00
MartinHjelmare 6e8c79d531 Change refactor structure
* Make a flatter one level inheritance, with MySensorsLight as parent
	with four children, one per light type.
* Break out helper methods. One per plain light, dimmer and RGB/RGBW
	children and per update, turn_on and turn_off, nine in total. Put
	these in the parent.
* Call the helper methods as needed from the child methods update,
	turn_on and turn_off.
* Change name of MySensorsLightLight to MySensorsLightPlain.
* Fix module docstrings according to pep257.
* Change name of color util method from rgb_hex_to_list to
	rgb_hex_to_rgb_list.
* Add unit tests for rgb_hex_to_rgb_list.
2016-02-18 02:04:06 +01:00
Paulus Schoutsen c66511e0cf Merge pull request #1275 from balloob/rfxtrxSignalRep
Rfxtrx signal rep
2016-02-16 20:23:55 -08:00
Paulus Schoutsen 79dbd14568 Merge pull request #1280 from molobrakos/tellduslive
added assumed_state property + improved error handling
2016-02-16 13:51:14 -08:00
Erik 008d65677b add assumed state property 2016-02-16 17:18:49 +01:00
Daniel b93ebe1936 Add signal repetition to rfxtrx 2016-02-15 19:45:33 +01:00
Daniel 0010cadd39 Add signal repetition to rfxtrx 2016-02-15 19:41:40 +01:00
John Arild Berentsen f429a6c4ff Add assumed_state for rfxtrx switch and light. 2016-02-15 18:59:11 +01:00
Paulus Schoutsen 8bea5c06de Add assumed_state property to entity 2016-02-13 23:42:11 -08:00
Paulus Schoutsen 77b141a355 Update Wink to 0.6 2016-02-13 08:17:38 -08:00
Paulus Schoutsen 7dd51034cd Merge pull request #1213 from MartinHjelmare/mysensors-light
Add mysensors light platform
2016-02-12 19:01:41 -08:00
MartinHjelmare 0492f0abd0 Fix error in update method for V_STATUS
* Remove check against V_STATUS to avoid error when using version 1.4
    of mysensors. V_LIGHT has the same integer value so V_STATUS is not
    needed.
2016-02-12 22:05:31 +01:00
Paulus Schoutsen 3c582d1e3c Merge pull request #1143 from balloob/rfxtrx
Rfxtrx
2016-02-11 23:30:34 -08:00
MartinHjelmare 2cf061c768 Add mysensors light platform
* Make light controllable independently with types V_LIGHT, V_DIMMER,
    V_RGB and V_RGBW. V_RGBW is not implemented in the frontend yet.
* Add discovery for light platform.
* Add optimistic mode config setting for switch and light
    to allow feedback state from actuator.
* Move S_LIGHT, V_LIGHT, V_STATUS types from switch to light platform.
* Change node update logging to debug from info level.
* Fix some inaccurate comments.
2016-02-12 01:22:35 +01:00
Dan Smith 4cfa14c29d Support manually-defined WeMo devices
This is extremely useful if you want to support wemos that are on
another subnet or across a VPN. It also lets you sidestep the discovery
process, which is problematic for a lot of people and situations.

In order for this to work, we need to bump the pywemo requirement to
0.3.10, which includes my changes to make this possible.

WeMo devices can be manually configured by adding a static section to
the config, like this:

  switch:
    platform: wemo
    static:
       - 192.168.100.5
       - 192.168.100.6
2016-02-11 17:23:20 +00:00
Daniel f938134069 updated rfxtrx lib 2016-02-11 14:15:51 +01:00
MartinHjelmare 75775a561b Use entity property available 2016-02-11 03:27:02 +01:00
Daniel cdf0e80773 Improve the robustness of the rfxtrx module, and solve issue #1116 2016-02-10 08:44:34 +01:00
Dan Smith 0a7db98b0e Round mFi sensor values to reasonable levels of precision
Most of the mFi sensors are able to reasonably provide accurate
readings to a tenth of a unit or so. This patch rounds them for
better display in the UI. Normally, I would expect this to be a view
action instead of altering the actual data emitted, but since these
values are reasonable for sensor precision, we're not really losing
anything. I followed the model from the openweathermap component, which
rounds for readability in the backend.
2016-02-07 20:51:00 +00:00
Dan Smith 951fa603ff Support mPort voltage output switch types
An mPort device has a voltage output port that, if configured,
we should support like a switch.
2016-02-07 20:48:57 +00:00
Dan Smith c113997609 Tweak mFi switch behavior to avoid false states
When we update the mFi server for the state of a switch, the new
state is not always reported immediately if we update right after
the action (the server is not RESTful).

This patch adds some internal target-state handling to report the
desired state on the next poll, allowing any subsequent polls to
override that state.

Also, bump the version requirement for mficlient to 0.2.2 to absorb
a bug fix.
2016-02-07 20:48:51 +00:00
Paulus Schoutsen 64611ab2be Merge pull request #1157 from balloob/device-state-attributes
Clean up state_attributes vs device_state_attributes
2016-02-07 10:16:34 -08:00
Fabian Affolter 757946293e Move configuration details to docs 2016-02-07 11:52:17 +01:00
Paulus Schoutsen f08b77dc4c Clean up state_attributes vs device_state_attributes 2016-02-06 22:34:24 -08:00
Paulus Schoutsen 428750eeda Merge pull request #1151 from kk7ds/add-mfi
Add support for Ubiquiti mFi sensors and switches
2016-02-06 20:11:53 -08:00
Dan Smith ffc4822f50 Add support for Ubiquiti mFi switchable devices
This adds support for mFi devices that are swichable,
such as the mFi Outlet device.
2016-02-07 03:02:49 +00:00
MartinHjelmare d773ad1ecb Fix mysensors version errors
* The application of the version check in unit_of_measurement was
	messed up after the last refactor. Fix that again.
* An error could occur in device_state_attributes if there was a
	mismatch between used value_type in the device and mysensors
	version in config. Add try... except to handle that.

Bump pyvera version.

Bump pywemo version.

Add unavailable status before properly initialised for maker and insight.
2016-02-07 00:28:12 +00:00
Paulus Schoutsen b3e966665a Merge pull request #1150 from bradsk88/master
Updating to python-wink 0.5.0
2016-02-06 13:04:42 -08:00
bradsk88 6e69737e88 Updating to python-wink 0.5.0
Major bugfix.  ``` get_bulbs ``` and similar methods were always returning empty lists.

Better unit tests have been added to https://github.com/bradsk88/python-wink to avoid this regression.
2016-02-06 14:22:46 -06:00
Paulus Schoutsen af0a44d976 Merge pull request #1144 from MartinHjelmare/fix-mysensors-errors
Fix mysensors version errors
2016-02-06 11:35:49 -08:00
Paulus Schoutsen dde80850a6 Merge pull request #1112 from balloob/switch-template
First cut of switch.template
2016-02-06 09:12:13 -08:00
MartinHjelmare b700ec4faa Fix mysensors version errors
* The application of the version check in unit_of_measurement was
	messed up after the last refactor. Fix that again.
* An error could occur in device_state_attributes if there was a
	mismatch between used value_type in the device and mysensors
	version in config. Add try... except to handle that.
2016-02-06 10:57:42 +01:00
pavoni 2622cf2e53 Use available, remove state, improve true,false tests. 2016-02-05 11:18:50 +00:00
Erik 50a9b3a7c0 reworked telldus live support 2016-02-05 00:07:12 +01:00
pavoni ced380f0cd Remove unneeded entity_id check and blank lines. 2016-02-04 17:24:38 +00:00
pavoni b20d3f8b3a Update docstrings. 2016-02-03 23:23:19 +00:00
pavoni 6e6c3c5cd5 Tidy. 2016-02-03 14:30:58 +00:00
pavoni 5521096c02 Add actions. 2016-02-03 14:29:25 +00:00
pavoni 9a9dbcfaea Refactor, support template logic values, add tests. 2016-02-03 13:16:13 +00:00
pavoni a955f3db08 WIP commit - template state working, on / off still to do. 2016-02-02 19:25:17 +00:00
Fabian Affolter 395743005a Add link to docs, new docstrings, and update docstrings 2016-02-01 11:47:09 +01:00
Flavio Castelli 8eef978241 Add support for the SCSGate device
Support the SCSGate device. This will allow home-assistant to interact
with BTicino/Legrand MyHome system.

Signed-off-by: Flavio Castelli <flavio@castelli.me>
2016-01-31 18:30:43 +01:00
Martin Hjelmare a8f7bc2324 Merge pull request #1034 from MartinHjelmare/refactor-s_v_types
Mysensors: Refactor s_types and v_types mapping
2016-01-30 01:04:06 +01:00
MartinHjelmare 9db0987e53 Refactor s_types and v_types mapping
To be able to handle new platforms with multiple used v_types but
single states, a new more strict mapping was required. Each s_type is
now mapped to its corresponding v_type(s) in a dict of lists.
2016-01-30 00:55:13 +01:00
Paulus Schoutsen f87c7d6732 Merge pull request #1023 from flyte/zigbee-pr
Add ZigBee integration and components.
2016-01-29 09:18:10 -08:00
Flyte c17a4fca80 ZigBee: Ensure correct entity types are used for each component. 2016-01-29 12:00:53 +00:00
Paulus Schoutsen cbc6323438 Fix imports 2016-01-28 21:45:26 -08:00
Flyte dda4f84150 Add zigbee components. 2016-01-28 13:18:29 +00:00
Paulus Schoutsen f3f592cdec Merge pull request #982 from stefan-jonasson/dev
Updated the entity names for all z-wave devices.
2016-01-26 22:51:34 -08:00
Stefan Jonasson 1d2cd0811b Updated Imports.
ZWave modules now import the domain from the base domain.
2016-01-27 07:37:41 +01:00
MartinHjelmare 1dae22a465 Fix device_state_attributes
* Return a dict with keys as the names of the enum members instead of
	the member values.
* This fixes a TypeError: unorderable types: int() < str()
2016-01-27 02:33:21 +01:00
Stefan Jonasson 1a422ecd5a Moved common z-wave node functionality to a common z-wave class 2016-01-26 22:11:27 +01:00
Martin Hjelmare b13e48bd71 Merge pull request #999 from MartinHjelmare/fix-not-adding-devices
Fix adding devices on the fly
2016-01-26 19:30:31 +01:00
MartinHjelmare 9117fa6eb8 Fix adding devices on the fly
Devices were not added without persistence enabled and restart of HA.
Node id was added to defaultdict(list) by mistake when checking if list
of defaultdict was empty.

* Fix adding devices in mysensors_callback.
* Change devices to regular dict.
2016-01-26 18:12:13 +01:00