Commit Graph

18 Commits (f51163f803e408fab0bf7aaab541752d9e66af63)

Author SHA1 Message Date
Jeff Wilson f3d9086ff4 Properly slugify switch.flux update service name (#8545) 2017-07-23 23:53:03 -07:00
Dougal Matthews d8abef9210 Add RGB support to switch.flux (#8417) 2017-07-13 19:53:19 -07:00
Adam Mills 40d27cde0e Refactor sun component for correctness (#7295)
* Refactor sun component for correctness

* Convert datetimes to dates for astral

* Fix tests for updated code

* Fix times now that calcs are fixed

* Move sun functions to helpers

* Fix flake on new file

* Additional tweaks from review

* Update requirements
2017-05-09 00:03:34 -07:00
Fabian Affolter a4f1f6e724 Update docstrings (#7374)
* 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
Anders Melchiorsen 9f68fd9184 Flux switch: avoid updates when off (#7363)
* Flux switch: avoid updates when off

Calling turn_on when the switch is already on would orphan the existing
time tracker, losing our ability to cancel it when turn_off is called.

* Cleanups

The self.is_on property can now be found from self.unsub_tracker, so
get rid of the self._state attribute.

Add an entry guard to turn_on, making further conditionals unnecessary.
2017-04-30 00:05:29 -07:00
Anders Melchiorsen 64a7be66b1 Remove global limit on white light temperature (#7206)
* Remove global limit on white light temperature

Here are the supported temperatures of some popular bulbs:

 Philips Hue: 2000K-6500K (the current 500-154 mired range)
 LIFX Color 1000: 2500K-9000K
 IKEA TRÅDFRI: 2200K, 2700K, 4000K

Obviously, Home Assistant cannot enforce a global limit and work properly
with all of these bulbs. So just remove the limit and leave it up to each
platform to work it out.

This commit updates the existing users and adds a clamp to Hue (where the
limit appears to have originated). It does not attempt to update other
platforms that might need extra handling of the larger range that is now
possible.

* Add min_mireds/max_mireds state attributes to lights

* Support min_mireds/max_mireds with LIFX lights
2017-04-29 15:04:20 -07:00
Teemu R 86dfa7ad25 [switch.flux] Allow disabling setting the brightness (#5407)
* flux: allow disabling setting the brightness

* Use separate boolean for disabling brightness adjustment

* Update flux.py
2017-01-26 23:08:08 -08:00
Tom Dickman 65bf30643a Use timezone aware timestamp in flux_update (#5378) 2017-01-16 22:55:05 -08:00
Teemu R d62b1fc808 Make initial flux update directly when turning on (#5266) 2017-01-16 22:53:34 -08:00
Paulus Schoutsen f006b00dc1 Fix spelling schedule_update_ha_state (#4415) 2016-11-16 08:26:29 -08:00
Pascal Vizeli 41aaeb715a Convert switch to AsnycIO (#4382)
* Convert switch to AsnycIO

* Move update entity to service

* use time better for faster handling

* Change to suggestion from paulus

* Use new shedule_update_ha_state

* fix lint

* minimize executor calls
2016-11-15 21:06:50 -08:00
Fabian Affolter be272ac64a Disable too-many-* (#4107)
* Disable too-many-* and too-few-public-methods

* Remove globally disabled pylint warnings
2016-10-30 22:18:53 +01:00
Jeff Wilson d55ed7a3a2 Flux switch improvements (#3615)
* Make flux always adjust brightness of light (even when not in XY mode)

* Remove kelvin mode from flux switch

The light/turn_on service only works with mired values, kelvin values
are out of range per the schema.

* Use already defined min/max values for light/turn_on schema

* Clamp temp value to light/turn_on allowed values
2016-10-01 22:57:15 -07:00
Paulus Schoutsen 5995f2438e fix remove listener (#3196) 2016-09-07 06:59:59 -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
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
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
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