Commit Graph

786 Commits (79ca47640e9fa0158244a425804a19d3890a38ef)

Author SHA1 Message Date
Paulus Schoutsen 4b8bc90d16 Limit worker pool to 10 threads (#3560)
* Limit worker pool to 10 threads

* Comment evdev in requirements

* Allow skipping RFXtrx tests locally

* Fix worker pool size tests

* lol whut
2016-09-28 00:05:38 -07:00
Paulus Schoutsen 00e298206e Optimize template 2 (#3521)
* Enforce compiling templates

* Refactor templates

* Add template validator to Logbook service

* Some more fixes

* Lint

* Allow easy skipping of rfxtrx tests

* Fix template bug in AND & OR conditions

* add entities extractor

Conflicts:
	tests/helpers/test_template.py

* fix unittest

* Convert template to be async

* Fix Farcy

* Lint fix

* Limit template updates to related entities

* Make template automation async
2016-09-27 21:29:55 -07:00
Per Sandström 4c45e92116 modbus update, add error log instead of AttributeError exception (#3517) 2016-09-26 20:46:34 -07:00
Paulus Schoutsen 0c0feda834 Pre-compile templates (#3515)
* Pre-compile templates

* Compile templates in numeric_state condition
2016-09-25 13:33:01 -07:00
Christian Brædstrup 81ebdadcec D-link switch library bump and error handling for W110 devices (#3386) (#3425) 2016-09-20 00:10:15 -07:00
William Scanlon 43c395232a Sensor updates (#3410) 2016-09-20 00:05:54 -07:00
Fabian Affolter 04d31e4ef4 Use voluptuous for RPi GPIO (#3371)
* Migrate to voluptuous

* Remove the check for lists
2016-09-17 23:28:37 -07:00
Paulus Schoutsen 4076ccf639 Use setup_component in tests (#3414)
* Alarm Control Panel Manual - use setup_component

* Update automation - zone tests

* Update climate - demo tests

* Update climate - generic thermostat tests

* Update cover - command line tests

* Update cover - demo tests

* Update device tracker tests

* Update device tracker - owntracks tests

* Update fan - demo tests

* Update garage door - demo tests

* Update light tests

* Update lock - demo tests

* Update media player - demo tests

* Update notify - command line tests

* Update notify - demo tests

* Update notify - file tests

* Update notify - group tests

* Update sensor - mfi tests

* Update sensor - moldindicator tests

* Update sensor - mqtt room tests

* Update switch - command line

* Update switch - flux

* Update switch tests

* Update scene tests

* Fix wrong default port for mfi switch
2016-09-17 10:29:58 -07:00
Fabian Affolter 727b756054 Use voluptuous for KNX (#3345)
* Migrate to voluptuous

* Make host optional and set default
2016-09-13 23:03:30 -07:00
Per Sandström ca646c08c2 Modbus component refactoring - sensors and switches (#3297) 2016-09-13 22:47:44 +02:00
Fabian Affolter 8ba952ee0e Use voluptuous for SCSGate (#3265)
* Migrate to voluptuous

* Extend platforms
2016-09-13 07:23:53 +02:00
Teagan Glenn 05a3b610ff Add ISY programs and support for all device types (#3082)
*  ISY Lock, Binary Sensor, Cover devices, Sensors and Fan support
* Support for ISY Programs
2016-09-11 20:18:53 +02:00
William Scanlon 58c0990508 Convert rgb to hsb for Wink Osram light 2016-09-11 10:45:04 -04:00
Fabian Affolter d48ed41122 Use constants (#3284) 2016-09-11 09:24:07 +02:00
Fabian Affolter f341974b8b Migrate to voluptuous (#3290) 2016-09-11 09:22:08 +02:00
Pascal Vizeli e87da765c5 cleanup Homematic code (#3291)
* cleanup old code

* cleanup round 2

* remove unwanted platforms
2016-09-09 19:33:12 +02:00
Fabian Affolter ee6c83f569 Use constants and update ordering (#3267)
🐬
2016-09-08 18:34:55 -06:00
Fabian Affolter 94e3986d54 Use constants and update ordering (#3261) 2016-09-08 16:26:54 +02:00
Paulus Schoutsen 5995f2438e fix remove listener (#3196) 2016-09-07 06:59:59 -07:00
Fabian Affolter 6a837f3aad Migrate to voluptuous (#3234) 2016-09-06 18:28:55 -07:00
Per Sandström d53d8f5ea9 thread safe modbus (#3188) 2016-09-06 18:21:38 -07:00
Fabian Affolter 7aafa309c9 Use voluptuous for Verisure (#3169)
* Migrate to voluptuous

* Update type and add missing config variable
2016-09-06 18:18:34 -07:00
Fabian Affolter abff2f2b36 Use voluptuous for PulseAudio Loopback (#3160)
* Migrate to voluptuous

* Fix conf var
2016-09-06 18:16:03 -07:00
Christian Brædstrup c1139a9fda dlink switch added device state attributes and support for legacy firmware (#3211) 2016-09-06 11:52:22 -06:00
Fabian Affolter 59cd92cb4d Use voluptuous for Edimax (#3178)
🐬
2016-09-04 19:17:40 -06:00
Fabian Affolter 98bdcd3405 Use voluptuous for Hikvisioncam switch (#3184)
* Migrate to voluptuous

* Use vol.Optional
2016-09-04 19:16:16 -06:00
Fabian Affolter 3c615e2319 Use voluptuous for mFi switch (#3168)
* Migrate to voluptuous

* Take change configuration into account
2016-09-03 20:32:35 -06:00
Fabian Affolter 02960ec482 Migrate to voluptuous (#3166)
🐬
2016-09-03 20:09:02 -06:00
Fabian Affolter 6ae4e5cb6c Use constants (#3148) 2016-09-03 00:09:14 +02:00
Fabian Affolter fb9627deda Move details to docs (#3146) 2016-09-02 23:25:35 +02:00
Fabian Affolter 40c71b5d96 Use voluptuous for Command line platforms (#2968)
* Migrate to voluptuous

* Fix pylint issues

* Remove FIXME

* Split setup test

* Test with bootstrap

* Remove lon and lat

* Fix pylint issues
2016-09-02 08:09:09 -06:00
Fabian Affolter e5ef548f10 Use voluptuous for Acer projector switch (#3077)
🐬
2016-09-02 07:42:38 -06:00
happyleavesaoc 24d3cbdfe9 orvibo updates (#3006)
🐬
2016-09-01 22:37:09 -06:00
Martin Hjelmare 6acaf25b0d Use voluptuous for mysensors (#2992)
* Add voluptuous config validation for mysensors
* Remove and clean up parts that are not needed for pymysensors 0.7.
2016-08-27 14:41:21 -06:00
Fabian Affolter b199c61c88 Migrate to voluptuous (#2955)
🐬
2016-08-24 22:36:41 -06:00
Fabian Affolter 9219d65c3e Migrate to voluptuous (#2958) 2016-08-24 22:35:09 -06:00
Greg Dowling dfd76fc0e6 Minor tidy of voluptuous. (#2945) 2016-08-22 23:57:07 -07:00
William Scanlon f00cdc50df Updated python-wink version to fix color/temp detection (#2935) 2016-08-22 21:31:17 -07:00
Greg Dowling eac67fd971 Add voluptuous to template switch (#2940)
* Add voluptuous to template switch / revise tests.
2016-08-23 00:05:45 +02:00
Fabian Affolter 5f508b6afa Use voluptuous for REST platforms (#2887)
* Initial step to migrate to voluptuous

* Migrate to voluptuous

* Add schema for sensor_classes
2016-08-20 16:28:45 -07:00
Fabian Affolter e8c6e4d561 Clean-up, ordering, constants, and extend of schema (#2903)
* Clean-up, ordering, constants, and extend of schema

* Put REQUIREMENTS back and re-add line breaks

* Clean-up, ordering, constants, and extend of schema

* Extend platform
2016-08-20 15:40:16 -07:00
Fabian Affolter 502c65ca32 Migrate to voluptuous (#2907) 2016-08-20 15:25:11 -07:00
Fabian Affolter c74e167a7b Use voluptuous for dweet, transmission, and twitch sensor (#2802)
* Use voluptuous for dweet, transmission, and twitch sensor

* Extent platform, ordering, and consts

* Clean-up
2016-08-19 00:18:45 -07:00
Nolan Gilley 324ddfdaeb fix flux_update service (#2792)
* fix flux_update service

* fix tests

* give update service unique name

* remove unnecessary param

* Revert "fix tests"

This reverts commit 2fd7760455.

* fix flux_update
2016-08-16 20:53:00 -07:00
D.-L.Pohl dc9f990ad2 Pilight component (#2742)
* New component to interface with a pilight-daemon for RF send/receive

* Fix bug that changed the received data, add connected flag, clean up

* New pilight switch component

* New optional whitelist filter to filter uninteressting devices

* Add pilight

* PEP8: too long lines, white spaces

* To keep up the good coverage ...

* PEP 257

* pylint enhancements

* pylint enhancements

* PEP 257

* Better HA config validation and cleanup following code review for #2742

* Fix requirenments to require fixed pilight version

* Change config validation to use voluptuous

* Pilight switch exclude not needed due to wildcard pilight exclude

* Enhance configuration parsing using voluptuous
2016-08-09 19:45:40 -07:00
HBDK a73c2e57a8 Added mired and kelvin mode to flux (#2665)
* Added mired and kelvin mode to flux

* changed as requested

* Renamed varible

* attempt to add test for new method in flux.py

* removed line to fix lint error
2016-07-31 16:55:48 -07:00
Johann Kellerman 4195254280 Update Qwikswitch: fix typing, add validation, shutdown (#2603)
* Update Qwikswitch: fix typing, add validation, shutdown

* Delay startup listener, fix validation

* Fix workerpool errors
2016-07-23 17:03:29 -07:00
William Scanlon 53f9809567 Wink water leak sensor (#2572) 2016-07-20 07:39:45 -07:00
Greg Dowling e34bfb7381 Tidy / Refactor Vera (#2569)
* Add power attribute to switch.

* Move device_state_attributes into base class.

* Fix imports following refactor.

* Bump pyvera version - should add contributed support for older (UI5) version dimmers and locks.

* Refactor device lookup to be based on vera classes, push category back into library.

* Add generic power attribute, fix inherited class order bug.

* Tidy.
2016-07-19 19:13:33 -07:00
Daniel Zozin 027266ed8b Fix initialization state for GPIO switches configured with inverted logic (#2550)
When switches are configured to use inverted logic, the GPIO pins initial
state has to be inverted as well (set to HIGH)
2016-07-17 15:18:16 -07:00
Malte Deiseroth f261aac9cb repaired dependency of the acer projector switch 2016-07-17 16:45:58 +02:00
Fabian Affolter 89972ed940 Add validation and switch python-mystrom (#2529) 2016-07-15 09:02:20 -07:00
William Scanlon 3246b58437 Support for Wink lock user codes (#2525) 2016-07-14 13:31:16 -07:00
Fabian Affolter 497bc6ac0d Update docstrings (#2513) 2016-07-13 14:47:29 +02:00
Fabian Affolter 82e992c63c Links docs (#2510)
* Add link to docs

* Fix link to docs

* Update docstrings

* Fix link
2016-07-13 11:10:31 +02:00
Fabian Affolter bef2f87ddc Docstrings (#2502)
* Update docstrings

* Update docstrings

* Add link to docs
2016-07-12 16:46:29 +02:00
Daniel Matuschek 50ea3c7744 Implementation of a KNX platform driver and a KNX switch (#2439)
* Implementation of a KNX platform driver and a KNX switch

* Starting working on a KNX thermostat implementation

* Removed KNX thermostat implementation from this branch again

* Make gateway parameter optional (can be auto-detected in many cases)

* Removed check for double initialisation

* KNX messages now will be handled internally and not send to the Home Assistant message bus

* Call update_ha_state only if should_poll is false

* Removed unused HASS variable

* knxip library version changed

* pylint optimization
2016-07-10 10:36:54 -07:00
GadgetReactor 609458052c New Switch Platform: TPLink Switch (HS100 / HS110) (#2453)
* New Switch Platform: TPLink Switch (HS100 / HS110)

### Information

The TPLink switch platform allows you to control the state of your TPLink Wi-Fi Smart Plugs.

Supported devices (tested):
HS100 (UK)

It should also work with the HS110.

To use your D-Link smart plugs in your installation, add the following to your configuration.yaml file:

"""
# Example configuration.yaml entry
switch:
  platform: tplink
  host: IP_ADRRESS
  name: TPLink Switch
"""

### Configuration variables:

host (Required): The IP address of your TPlink plug, eg. http://192.168.1.105
name (Optional): The name to use when displaying this switch.

* Update tplink.py

Bug fixes

* Separate to a standalone library

* Removed unnecessary imports

* Code cleanup and update reference library link

* TPLink switch support (#2453)

* updated requirements
2016-07-10 09:48:02 -07:00
clach04 344fb9c8b4 Fix typos in demo switch doc strings (#2480) 2016-07-09 09:35:55 +02:00
Paulus Schoutsen 31b8e49ad2 Fix PyLint 1.6 issues (#2471) 2016-07-07 18:54:16 -07:00
William Scanlon 2b514139eb Downgraded pubnub version (#2420) 2016-07-02 10:04:51 -07:00
Fabian Affolter 419ff18afb Docstrings (#2395)
* Replace switch with lock

* Update docstrings

* Add link to docs

* Add link to docs and update docstrings

* Update docstring

* Update docstrings and fix typos

* Add link to docs

* Add link to docs

* Add link to docs and update docstrings

* Fix link to docs and update docstrings

* Remove blank line

* Add link to docs
2016-06-30 10:33:34 +02:00
William Scanlon 6a816116ab Wink subscription support (#2324) 2016-06-29 14:16:53 -07:00
Pascal Vizeli baa9bdf6fc change homematic to autodetect only 2016-06-28 22:53:53 +02:00
Pascal Vizeli e4d3b25f1e Merge remote-tracking branch 'refs/remotes/home-assistant/dev' into Homematic
# Conflicts:
#	homeassistant/components/thermostat/homematic.py
2016-06-25 22:02:14 +02:00
Pascal Vizeli e0e9d3c57b change autodiscovery 2016-06-25 21:37:51 +02:00
Pascal Vizeli 199fbc7a15 Revert "fix autodiscovery"
This reverts commit 86ccf26a1a.
2016-06-25 21:03:37 +02:00
Pascal Vizeli 86ccf26a1a fix autodiscovery 2016-06-25 20:12:49 +02:00
Paulus Schoutsen 68df3deee0 ABC consistent not implemented behavior (#2359) 2016-06-24 21:27:40 -07:00
Pascal Vizeli 67a04c2a0e Initial clean import 2016-06-24 10:06:58 +02:00
Phil Kates 40840044ca Wink Rollershutter (#2294)
* Update python-wink to 0.7.7

* Add Wink Rollershutter component
2016-06-18 09:59:13 -07:00
Martin Hjelmare 81ca175906 Add mysensors IR switch device and service (#2239)
* Add mysensors IR switch device and service

* Add MySensorsIRSwitch as child class to MySensorsSwitch.
* Add platform specific service mysensors_send_ir_code. Only call
	device method in service function if device is IR device.
* Add service and required attribute to state helper to support scenes.
* Move V_IR_SEND type from sensor.mysensors to switch.mysensors
	platform.
* Populate switch.services.yaml with service descriptions.

* Fix check of entity_id in service function

Since multiple entity_ids can be passed as service data, and the
entity_id service attribute is forced to a list by the service
validation schema, the check in the service function should iterate
over any entity ids.
2016-06-12 23:04:45 +02:00
Paulus Schoutsen 30f74bb3ca Migrate to generic discovery method (#2271)
* Migrate to generic discovery method

* Add tests for discovery
2016-06-11 17:43:13 -07:00
Joseph Piron b6d75e6c5a Netio Switch platform support (#2181)
* WSGI based request handler

with a bit of polishing

Signed-off-by: eagleamon <joseph.piron@gmail.com>

* removed stale comment and fixed version, but failed tests do not seem to be related

* removing the wrapper hack

* added in requirements file

* Found the caved in lint error..
2016-06-09 23:40:14 -07:00
Paulus Schoutsen 271546d101 Merge branch 'pr/2251' into dev
Conflicts:
	homeassistant/components/switch/template.py
2016-06-07 19:16:14 -07:00
Johann Kellerman d1ed17e7db Default parameter for .run() 2016-06-07 23:00:09 +02:00
Johann Kellerman ed44d28fc0 service helper replaced with script helper (#2242) 2016-06-06 07:36:04 -07:00
Johann Kellerman d5f9c1bc01 Updated template switch to cache Script objects 2016-06-06 06:41:29 +02:00
Johann Kellerman 8887c2a8af service helper replaced with script helper 2016-06-05 21:44:57 +02:00
Jacob Tomlinson ca7415e935 Added rfxtrx rollershutter (#2030)
* Added rfxtrx rollershutter

* Updated mock command with real one

* Corrected test string
2016-06-02 00:39:58 -07:00
Nolan Gilley 24d2eaa6ca flux platform as a switch (#2097)
* flux platform as a switch

* use track_time_change. broken :(

* use track_utc_time_change instead of track_time_change

* add some basic tests

* use brightness from RGB_to_xy

* config_schema validation

* back to platform schema. what was i doing?

* more broken tests :(

* 644

* fix some time bugs

* add working tests. config validation still not right

* bug fixes and more test cases.
2016-06-01 23:38:19 -07:00
Paulus Schoutsen 3ac31b2c1b Fix broken tests + linting 2016-05-30 10:19:12 -07:00
Paulus Schoutsen a91f937245 Fix linting issues 2016-05-30 10:08:49 -07:00
Bart274 65fbba0e79 List entity_ids in config and only react to them (#2144)
* List entity_ids in config and only react to them

This allows us to define a list of entity_ids in the config to make the
template sensor, binary sensor and switch only react to state changes of
these entities instead of listening to all state changes.

* Forgot to import the track_state_change function

* Changed test for added entity_ids to config

* Use default MATCH_ALL and remove event_listener
2016-05-29 14:34:21 -07:00
rubund bf940bd1f3 Initial support for EnOcean (#2177)
* Initial support for EnOcean

Tested to work with:
 - Eltako FUD61 dimmer
 - Eltako FT55 battery-less switch
 - Permundo PSC234 (switch and power monitor)

* Rerun gen_requirements_all.py
2016-05-29 14:28:03 -07:00
s1gnalrunner 70d6ce5b79 Fixed issue with edimax SP-1101 switches (#2105)
* Fixed issue with edimax SP-1101 switches

* Added missing ValueError exception
2016-05-26 05:53:10 -07:00
Fabian Affolter 7f0b8c5e70 Docs (#2124)
* Add link to docs

* Update link
2016-05-21 16:59:52 +02:00
Johann Kellerman 6dae005b65 Resolved UI flicker, new config vars, brightness up to 255, fixed buttons, fixed race condition (#2072) 2016-05-14 14:21:05 -07:00
Johann Kellerman 65ac1ae84a Added QwikSwitch component & platforms (#1970)
* Added QwikSwitch platform

farcy - worst than my english teacher

* Clean up comments

* Import only inside functions

* Moved imports, no global var, load_platform

* add_device reworked

* Only serializable content on bus

* Fixed imports & removed some logging
2016-05-12 21:39:30 -07:00
Paulus Schoutsen f1eda430cd Update rpi_rf.py 2016-05-12 00:13:48 -07:00
William Scanlon 1cd59cf2a9 Added battery level to wink devices (#1979) 2016-05-06 18:19:37 -07:00
Fabian Affolter 2274806bee UPdate link to docs 2016-05-05 00:32:11 +02:00
Per Sandström 4850a65ed0 add reconnect retry and longer timeouts for verisure (#1944) 2016-05-03 18:53:11 -07:00
deisi b2abe552a0 Added a switch to control beamers from acer (#1913) 2016-05-03 18:23:38 -07:00
Martin Hjelmare 069a4b1706 Refactor mysensors component
* Add MySensorsDeviceEntity class to hold the common attributes,
	properties and methods for mysensors entities.
* Inherit from MySensorsDeviceEntity class in binary_sensor, light,
	sensor and switch mysensors platforms.
* Remove not needed attribute and method for const in GatewayWrapper
	class. The const attribute is already set in the wrapped object.
* Clean up state property for mysensors sensor entities.
* Inherit from MySensorsLightRGB in MySensorsLightRGBW class.
* Remove use of get_component in mysensors component and platforms.
* Clean up update method in MySensorsDeviceEntity class.
2016-04-30 15:27:59 +02:00
Brad Johnson 725b336683 Upgrading to python-wink 0.7.5. (#1925)
This fixes a bug where light bulb statuses were failing to update on the HA polling update call.
2016-04-28 08:22:39 +02:00
Micha LaQua 08d60fb04b Initial support for generic 433Mhz GPIO adapters on a Raspberry Pi (#1865)
* initial support for generic 433mhz gpio adapters

* rpi-rf: refactor id_on/id_off to code_on/code_off

fits the purpose better and improves understanding

* rpi-rf: use v0.9.4

* rpi-rf: update features and dependencies to v0.9.5

includes the ability to optionally specify a protocol for each switch

* rpi-rf: remove explicit RPi.GPIO dependency

already a dependency of the rpi-rf module

* rpi-rf: make setting gpio, code_on and code_off mandatory

* rpi-rf: remove unused value_template

* rpi-rf: only enable TX once if there are switches
2016-04-26 11:35:01 +02:00
Dan Cinnamon 7154603567 Summary: Enhanced to make more robust and efficient. (#1917)
Prevented a switch from being turned on twice.

Made the module regex more robust.

Refactored the code to reduce the amount of network traffic to/from pulseaudio.

Fixed pylint issues
2016-04-26 11:29:20 +02:00
Per Sandström ba696888c1 Merge pull request #1889 from persandstrom/verisure_updated_links
Verisure: new version and changed "key" in smartplug
2016-04-22 20:15:26 +02:00
Per Sandström a4083bab1a new version and changed "key" 2016-04-22 20:02:54 +02:00
Daniel Høyer Iversen d3fb69783d Tellstick config validation 2016-04-21 07:57:28 -07:00
Paulus Schoutsen 9d391becc1 Add mysensors tcp ethernet gateway (#1861)
* Bump version of pymysensors to 0.6, which includes the tcp gateway.
* Update requirements_all.txt.
* Replace CONF_PORT with CONF_DEVICE and ATTR_PORT with ATTR_DEVICE.
* Add tcp_port in config.
* Try to guess if tcp or serial gateway is configured, by validating
	device name as an ip address. If successful setup tcp gateway, if it
	fails, setup serial gateway.
* Update device_state_attributes to show correct device, ethernet or
	serial.
2016-04-19 21:00:56 -07:00
Brad Johnson 09693bf16c Upgrading to python-wink 0.7.4 and improving RGB color support in HA (#1832) 2016-04-17 19:07:21 -07:00
John Arild Berentsen b45c0cd735 Zwave import fixes for stability (#1845) 2016-04-17 14:46:51 -07:00
Paulus Schoutsen 68d92c3196 Use standardised datetime format 2016-04-16 01:46:50 -07:00
Jan Harkes 1deaf2fe8f Service validation for switch component. 2016-04-13 12:35:07 -04:00
Dennis Karpienski a862e994c7 Thinkingcleaner support (#1784)
* added first implementation of thinking cleaner

* fix lock release

* fixed tox flaws

* updated coveragerc

* fixed lock

* changed update lock

* fixed codestyle
2016-04-10 16:59:53 -07:00
Daniel Høyer Iversen cac555fc69 Rfxtrx config validating (#1747)
* config validation

* Config validation of rfxtrx switch

* Config validation of rfxtrx light

* Config validation of rfxtrx

* Config validation of rfxtrx
2016-04-08 20:55:31 -07:00
Jan Harkes a7016e4b32 Move CONF_STATE_TOPIC, CONF_COMMAND_TOPIC and CONF_RETAIN to mqtt component. 2016-04-06 22:51:39 -04:00
Jan Harkes deecec5e4e Config validation for MQTT switch platform. 2016-04-06 22:51:39 -04:00
Will Hughes 5a32ddbe6f Update Orvibo platform to the switch component, add 'mac' option
This adds an optional 'mac' configuration option to the platform which

is passed to the underlying Orvibo library. The 'mac' option is required

when the switch is connected to a different subnet to the Home Assistant

host
2016-04-06 14:52:21 -07:00
Daniel Høyer Iversen cfb318287d Refactor rfxtrx component 2016-04-06 10:34:51 -07:00
root 7b1ec418f2 Fix crash of Rfxtrx component when using config option fire_event 2016-03-30 16:20:19 +02:00
Paulus Schoutsen 5baa98b79f Add initial config validation 2016-03-28 23:46:12 -07:00
Paulus Schoutsen 41f205e09d Clean up template platforms 2016-03-24 23:22:17 -07:00
Paulus Schoutsen 70ce179224 Merge pull request #1551 from w1ll1am23/command_line_assumed
Added assumed state to command_line switch
2016-03-24 21:54:36 -07:00
Paulus Schoutsen 5bd004ee38 Merge pull request #1526 from tilutza/dev
Arduino switch: add support for default stat and negate port function…
2016-03-22 08:40:39 -07:00
Dan Cinnamon 6ee3ca8264 Creation of a new platform for the existing switch component. 2016-03-20 23:10:57 -05:00
dtila a8761e1ef8 Add support for having default state on arduino switch and negate functionality
Arduino switch: add support for default stat and negate port functionality

Travis changes

Arduino switch: add support for default stat and negate port functionality
Because Travis was configured to have maxiimum 5 arguments allowed in functions, I changed the function constructor signature too ... Paul, 6 parameters for a function is really ok

Arduino Switch: add default state config and negate functionality
2016-03-20 12:52:06 +02:00
joopert 0bbcc81285 wake on lan platform 2016-03-18 15:01:53 +01:00
Paulus Schoutsen c093a2bf54 Merge pull request #1564 from balloob/fix_template_race_condition
Fix remaining race condition in template components.
2016-03-17 21:18:38 -07:00
William Scanlon 208a7c9e60 Added available method to all wink components 2016-03-17 15:57:26 -04:00
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
Stefan Jonasson f4c9540a1b Updated teh entity_id generation
Entity ids will now look like this:
sensor.philio_technology_corporation_psm021_slim_multisensor_doorwindow_sensor_7
sensor.philio_technology_corporation_psm021_slim_multisensor_luminance_7
sensor.philio_technology_corporation_psm021_slim_multisensor_motion_sensor_7
sensor.philio_technology_corporation_psm021_slim_multisensor_tamper_sensor_7
sensor.philio_technology_corporation_psm021_slim_multisensor_temperature_7

sensor.philio_technology_corporation_psm021_slim_multisensor_doorwindow_sensor_8
sensor.philio_technology_corporation_psm021_slim_multisensor_luminance_8
sensor.philio_technology_corporation_psm021_slim_multisensor_motion_sensor_8
sensor.philio_technology_corporation_psm021_slim_multisensor_tamper_sensor_8
sensor.philio_technology_corporation_psm021_slim_multisensor_temperature_8

And if there is several values of the same type in a node the instance id will be appended like this (three switches in the same device):
switch.fibaro_system_unknown_type0202_id1002_switch_9
switch.fibaro_system_unknown_type0202_id1002_switch_9_2
switch.fibaro_system_unknown_type0202_id1002_switch_9_3
2016-01-26 09:33:26 +01:00
happyleavesaoc 80c6bf6744 bump orvibo version 2016-01-25 16:40:27 -05:00
William Scanlon c95b03f240 Fixed style 2016-01-21 18:32:10 -08:00
William Scanlon 56ce3e5f5a Wink siren support 2016-01-21 18:32:10 -08:00
pavoni d2d421ca8f Remove ghost debug code. 2016-01-20 20:02:03 +00:00
pavoni 7ad5b3a17b Fix bug related to maker_param types 2016-01-20 19:13:29 +00:00
pavoni 0de9229d75 More tidying. 2016-01-20 11:25:20 +00:00
pavoni f4c3ac2a62 Tidy 2016-01-20 11:19:00 +00:00
pavoni 6c5ceaf686 Remove sensor state from switch and wemo 2016-01-20 11:06:08 +00:00
Erik d43101f22a fix issue where sensors and switches were duplicated because of component getting initialized twice. closes #913 2016-01-18 19:41:41 +01:00
Ryan Kraus 342a819fd4 Added toggle service
Added a toggle service to the homeassistant, light, switch, and
media_player domains.
2016-01-16 10:45:05 -05:00
pavoni be23c6c86d Bump pywemo version. 2016-01-16 11:35:17 +00:00
Greg Dowling 3d27dd3ec4 Merge pull request #902 from balloob/fix_vera_sensor_subscriptions
Another Vera fix
2016-01-15 21:46:27 +00:00
pavoni c2f5eb3073 Missed change. 2016-01-15 21:42:51 +00:00
pavoni 541b268721 Update to use refactored pyvera, fixes subscription issues - esp sensors. 2016-01-15 21:30:58 +00:00
sfam 7c925ac295 update comments 2016-01-15 16:53:46 +00:00
sfam 8617b92d1b Update RPi.GPIO version and code refactoring 2016-01-15 16:53:45 +00:00
Paulus Schoutsen bb80e3a9fc Merge pull request #898 from balloob/vera_fixes
Vera fixes
2016-01-15 07:43:03 -08:00
pavoni 4fd79afa42 Bump pyvera version. 2016-01-15 11:45:17 +00:00
pavoni 4bc33d0352 Bump pyvera version. 2016-01-15 10:34:14 +00:00
Paulus Schoutsen bed9b038c8 Merge pull request #856 from w1ll1am23/Wink_power_strip_support
Wink power strip support
2016-01-14 19:23:41 -08:00
William Scanlon de5bee6359 Updated python-wink version 2016-01-14 08:56:59 -05:00
Paulus Schoutsen 3b7b12bbd5 Make Flake8 happy 2016-01-12 21:53:27 -08:00
Paulus Schoutsen a5b198e2b8 Merge pull request #771 from MartinHjelmare/mysensors-component-switch
Mysensors component switch
2016-01-11 19:04:35 -08:00
pavoni fca8ad5b0b Tidy. 2016-01-10 12:48:36 +00:00
pavoni 4b4fb038e3 Update for new library, slightly revise switch logic. 2016-01-10 12:30:47 +00:00
MartinHjelmare 0b3a66dd1a Merge branch 'dev' into mysensors-component-switch 2016-01-10 04:27:39 +01:00
MartinHjelmare 2d8cf7de44 Fix wrapper and S_BINARY and bump req. version
* Wrap existing SerialGateway instance instead of subclassing
	SerialGatewat class.
* Add S_BINARY in switch platform only in version 1.5 of mysenors api.
* Use version 0.4 of pymysensors.
* Show gateway port as state attribute.
2016-01-10 04:10:38 +01:00