Commit Graph

37 Commits (d348f09d3d42c6bd65727a471cf363cbca19105f)

Author SHA1 Message Date
Julius Mittenzwei 3713dfe139 Removing asyncio.coroutine syntax from some components ()
* Removing asyncio.coroutine syntax (first steps)

* merge conflict

* fixed small bug

* pylint
2018-02-24 10:24:33 -08:00
Otto Winter 678f284015 Upgrade pylint to 1.8.2 ()
* Upgrade pylint to 1.8.1

* Fix no-else-return

* Fix bad-whitespace

* Fix too-many-nested-blocks

* Fix raising-format-tuple

See https://github.com/PyCQA/pylint/blob/master/doc/whatsnew/1.8.rst

* Fix len-as-condition

* Fix logging-not-lazy

Not sure about that TEMP_CELSIUS though, but internally it's probably just like if you concatenated any other (variable) string

* Fix stop-iteration-return

* Fix useless-super-delegation

* Fix trailing-comma-tuple

Both of these seem to simply be bugs:
 * Nest: The value of self._humidity never seems to be used anywhere
 * Dovado: The called API method seems to expect a "normal" number

* Fix redefined-argument-from-local

* Fix consider-using-enumerate

* Fix wrong-import-order

* Fix arguments-differ

* Fix missed no-else-return

* Fix no-member and related

* Fix signatures-differ

* Revert "Upgrade pylint to 1.8.1"

This reverts commit af78aa00f125a7d34add97b9d50c14db48412211.

* Fix arguments-differ

* except for device_tracker

* Cleanup

* Fix test using positional argument

* Fix line too long

I forgot to run flake8 - shame on me... 🙃

* Fix bad-option-value for 1.6.5

* Fix arguments-differ for device_tracker

* Upgrade pylint to 1.8.2

* 👕 Fix missed no-member
2018-02-11 09:20:28 -08:00
Frantz 676c95ed2d [SMALL-PR] Don't make climate calls if feature is not supported ()
* Don't make climate calls if feature is not supported

* Implemented suggested code review changes & cleanup

* Fix demo climate unit tests
2018-01-24 09:35:31 +01:00
Anders Melchiorsen 8267a21bfe Lazy loading of service descriptions ()
* Lazy loading of service descriptions

* Fix tests

* Load YAML in executor

* Return a copy of available services to allow mutations

* Remove lint

* Add zha/services.yaml

* Only cache descriptions for known services

* Remove lint

* Remove description loading during service registration

* Remove description parameter from async_register

* Test async_get_all_descriptions

* Remove lint

* Fix typos from multi-edit

* Remove unused arguments

* Remove unused import os

* Remove unused import os, part 2

* Remove unneeded coroutine decorator

* Only use executor for loading files

* Cleanups suggested in review

* Increase test coverage

* Fix races in existing tests
2018-01-07 14:54:16 -08:00
Andrey eb00e54eba Add on/off supported feature to climate ()
* Add on/off supported feature to climate

* Lint
2018-01-03 23:10:54 +01:00
Lukas Barth 373508693a Climate component: add supported_features ()
* Implement supported_features for the climate component

* Test supported features

* Convert generic thermostat to supported features

* Max / min temperature are not features

* Fix lint

* Min / max humidity are not features

* Linting

* Remove current temperature / humidity

* Move c-hacker-style constants to boring integers. Booo!

* Refactor all the climate platforms to use the new supported_features

* Force all climate platforms to implement supported_features

* Fix mistakes

* Adapt hive platform

* Move flags into a constant

* Calm the hound
2017-11-29 11:01:28 +01:00
Fabian Affolter d25f676711 Move temperature display helper from components to helpers () 2017-11-14 10:36:18 +01:00
Pascal Vizeli c1b197419d Fix async probs ()
* Update entity.py

* Update entity_component.py

* Update entity_component.py

* Update __init__.py

* Update entity_component.py

* Update entity_component.py

* Update entity.py

* cleanup entity

* Update entity_component.py

* Update entity_component.py

* Fix names & comments / fix tests

* Revert deadlock protection

* Add tests for entity

* Add test fix name

* Update other code

* Fix lint

* Remove restore state from template entities

* Lint
2017-10-19 10:56:25 +02:00
William Scanlon 312de6b3a3 New Wink services. pair new device, rename, and delete, add new lock key code. Add water heater support ()
* Pair new device, rename, delete, and lock key code services. Also add water heater support.

* Fixed tox
2017-09-26 23:17:55 -07:00
Michael Prokop 08b0629eca Fix a bunch of typos ()
s/Addres /Address /
s/Chnage/Change/
s/Converion/Conversion/
s/Supressing/Suppressing/
s/agains /against /
s/allready/already/
s/analagous/analogous/
s/aquired/acquired/
s/arbitray/arbitrary/
s/argment/argument/
s/aroung/around/
s/attibute/attribute/
s/auxillary/auxiliary/
s/befor /before /
s/commmand/command/
s/conatin/contain/
s/conection/connection/
s/coresponding/corresponding/
s/entites/entities/
s/enviroment/environment/
s/everyhing/everything/
s/expected expected/expected/
s/explicity/explicitly/
s/formated/formatted/
s/incomming/incoming/
s/informations/information/
s/inital/initial/
s/inteface/interface/
s/interupt/interrupt/
s/mimick/mimic/
s/mulitple/multiple/
s/multible/multiple/
s/occured/occurred/
s/occuring/occurring/
s/overrided/overridden/
s/overriden/overridden/
s/platfrom/platform/
s/positon/position/
s/progess/progress/
s/recieved/received/
s/reciever/receiver/
s/recieving/receiving/
s/reponse/response/
s/representaion/representation/
s/resgister/register/
s/retrive/retrieve/
s/reuqests/requests/
s/segements/segments/
s/seperated/separated/
s/sheduled/scheduled/
s/succesfully/successfully/
s/suppport/support/
s/targetting/targeting/
s/thats/that's/
s/the the/the/
s/unkown/unknown/
s/verison/version/
s/while loggin out/while logging out/
2017-09-23 17:15:46 +02:00
Martin Hjelmare fbb6782081 Fix SET_TEMPERATURE_SCHEMA in climate component ()
* Require either temperature or high/low target temperatures.
* Add tests.
2017-08-12 09:39:05 -07:00
Paulus Schoutsen d29bdddaa7 Add bind_hass to components ()
* Add bind_hass to components

* Add bind_hass to group
2017-07-16 10:14:46 -07:00
Paulus Schoutsen 46e030662d Fix pylint 1.7.2 no-else-return issues ()
* Fix pylint 1.7.2 no-else-return issues

* Update tomato.py
2017-07-05 23:30:01 -07:00
Sean Dague a55d8776ff Throw exception if _convert_for_display called on non Number ()
In trying to come up for some reason behind issue  (which only
happens on some platforms) the best guess is that some components are
managing to get a string value all the way up to the Polymer UI for
temperature, which then an increment of +0.5 is treating as a string
concat operation instead of addition. So 20 + 0.5 becomes 200.5 hits
the max thermostat value.

This will throw an exception if the climate temp value isn't a
number. That's going to turn a soft fail into a hard fail on
potentially a number of platforms. Mysensors is one of the platforms
that was reported as having the issue. So put some explicit float
casts where that might be coming from as well.
2017-06-23 23:03:37 -07:00
Paulus Schoutsen f43db3c615 Replace executor with async_add_job ()
* Remove executor

* Lint

* Lint

* Fix tests
2017-05-26 08:28:07 -07:00
Andrey 11dc7246af Add Sensibo climate platform ()
* Add Sensibo climate platform

* Force update after running a service

* Add sensibo to .coveragerc

* Use 10s timeout

* Fix schema. Remove print.

* Better handle unit conversions.
2017-05-02 17:23:36 -07:00
Fabian Affolter a4f1f6e724 Update docstrings ()
* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstring

* Update docstrings

* Update docstrings

* Fix lint issues

* Update docstrings

* Revert changes in dict
2017-05-02 09:18:47 -07:00
Fabian Affolter 3ee4d1060f Update docstrings ()
* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update tomato.py

* Update isy994.py

* Lint + fix tests

* Lint
2017-04-29 22:04:49 -07:00
aufano 2ce8c2f80e Fix current_temperature is rounded ()
* Fix current_temperature is rounded

* fix  Unnecessary parens after 'if'
2017-04-06 17:40:59 -07:00
Paulus Schoutsen e265401cd0 self.loop.create_task -> self.add_job ()
* self.loop.create_task -> self.add_job

* Core to use create task
2017-03-16 06:58:54 +01:00
Duoxilian 7fa08059dc Support away_mode as permanent hold and hold_mode as temporary hold. ()
* Support away_mode as permanent hold and hold_mode as temporary hold.

* Add comments to explain code better. Remove indefinite hold preference
to be consistent with 'away_mode'.
2017-02-08 20:04:09 -08:00
Duoxilian 219337a574 Cleanup climate and ecobee ()
* Remove redundant input validation which is already accomplished through
defined schemata.

* Rely on defined state attributes for hold mode.

* Remove misleading comment. This comment seems to assume that sleep
mode is a hold; it is a schedule instead. The code snippets in the
comment could never work.

* Remove use of constants for hold mode. Will be made irrelevant
by a planned change by nordlead2005.
2017-02-02 15:28:32 +01:00
Duoxilian b732174def Hold mode ()
* Initial commit of hold_mode feature.

* Added deprecation warning for climate.away_mode

* Add tests to demo environment.
2017-01-27 08:57:18 -08:00
Pascal Vizeli 1719d88602 Bugfix default values to timedelta ()
* Bugfix default values to timedelta

* fix unittests
2017-01-06 00:16:12 +01:00
Pascal Vizeli 22d1bf0acd Async migrate climate ()
* Async migrate climate

* Change update handling
2016-12-26 14:09:15 +01:00
Sean Dague 038b1c1fc6 precision properties for climate components ()
This lets components declare their precision for temperatures. If
nothing is declared, we assume 0.1 C and whole integer precision in
F. Currently this supports only WHOLE, HALVES, and TENTHS for
precision, but adding other precision levels is pretty straight
forward.

This also uses proliphix as an example of changing the precision for a
platform.

Closes bug 
2016-11-27 14:19:12 -08:00
Paulus Schoutsen 2c7e895105 Entity and climate: do not convert temperature unnecessary ()
* Climate: more consistent units

* Prevent unnecessary conversion in entity component

* int -> round

* Disable Google tests because they connect to the internet

* Remove default conversion rounding F->C

* Add rounding of temp to weather comp

* Fix equality

* Maintain precision when converting temp in entity

* Revert "Disable Google tests because they connect to the internet"

This reverts commit b60485dc19.
2016-11-22 17:38:04 -08:00
Fabian Affolter be272ac64a Disable too-many-* ()
* Disable too-many-* and too-few-public-methods

* Remove globally disabled pylint warnings
2016-10-30 22:18:53 +01:00
juggie d921073e77 Ecobee - Celsius ()
*  - Ecobee tempoeratures

*  Remove unused import

*  Implement min/max_temp in ecobee.py as these temperatures have to be in F for ecobee api.

*  Stale print

*  Use min/max_temp from base class

*  Removed unused import (again) so tests pass since changing to use super class

*  Fix long lines

*  Install tox locally... make it happy, commit

*  Remove overridden min/max_temp and instead update __init__:min/max_temp to convert to self.temperature_unit (of the thermostat) as opposed to self.unit_of_measurement (of the system), which is wrong

* Remove unused import from ecobee
2016-10-17 20:06:03 -07:00
John Arild Berentsen 6ca0d4cd14 Use pass instead of return None () 2016-10-14 00:09:24 -07:00
Russell Cloran 7c2cb6cffd Separate climate platform and presentation units ()
* Separate platform and presentation units in climate

* Fix unit tests

Maybe

* Fix unit tests some more

Maybe

* Rename _platform_unit_of_measurement to temperature_unit

* Fix tests for renamed attribute
2016-10-11 00:00:29 -07:00
John Arild Berentsen b2354f45be Add possibility to set temperature to a given operation_mode ()
* Add possibility to set temperature to a given operation_mode

* Correctly break

* Review changes
2016-10-04 23:48:25 -07:00
Pascal Vizeli 41aff96375 Bugfix temp convert on none temp attribute / unittest for that () 2016-10-03 10:46:31 +02:00
Pascal Vizeli c189c05676 Add temp convert to climate base object ()
* Add temp convert to climate base object

* fix nest

* fix lint
2016-10-01 22:15:19 -07:00
John Arild Berentsen ba28208106 Added stuff for support range setting () 2016-09-09 11:06:53 -06:00
John Arild Berentsen 17a57d3b47 Fixes wrong statevalue and problem with zwave setpoint ()
* Fixes wrong statevalue and problem with zwave setpoint

* Fix demo test to match bugfix ()
2016-08-28 17:58:50 +02:00
John Arild Berentsen ada4de3ffb Migrate Thermostat and HVAC component to climate component ()
* First draft for climate

* Updates for thermostats
2016-08-19 00:17:28 -07:00