1
mirror of https://github.com/home-assistant/core synced 2024-09-15 17:29:45 +02:00
Commit Graph

30 Commits

Author SHA1 Message Date
Paulus Schoutsen
c85a7934ed
Add brightness_step to light.turn_on (#31452)
* Clean up light turn on service

* Add brightness_step to turn_on schema

* Fix import

* Fix imports 2

* Fix RFLink test
2020-02-04 16:13:29 -08:00
Raman Gupta
040fd9c258 Update service domains for xiaomi_miio from base domains to xiaomi_miio domain (#29134)
* move service constants to const.py, move all custom xiaomi_miio services to xiaomi_miio domain

* update service names

* try to fix black error

* try black formatting again

* final black formatting attempt

* update service names to reflect platform

* fix typo
2019-12-02 11:49:39 -08:00
Raman Gupta
1f13809c6d Update service domain for lifx from 'light' to 'lifx' (#29136)
* update service domain for lifx custom services

* fix service name
2019-11-27 11:23:06 +01:00
Santobert
3547b8691e Add examples to lights service (#27192) 2019-10-04 08:46:23 -07:00
Franck Nijhof
4733fea416 Adds fields to light.toggle service description (#27155) 2019-10-03 13:28:53 -07:00
cgtobi
31e514ec15 Add missing services.yaml file for hue (#23217)
* Add hue services.yaml

* Add lifx services.yaml

* Add lutron services.yaml

* Update lifx services.yaml

* Update hue services.yaml

* Revert lifx services.yaml as it is not necessary

* Remove hue from lights/services.yaml
2019-04-19 14:53:58 -07:00
Erik Montnemery
98644135fa
Update light/services.yaml (#22662) 2019-04-03 20:30:03 +02:00
zewelor
9214934d47 Move yeelight into component (#21593) 2019-03-24 13:01:12 +01:00
zewelor
f2abc91c1e Allow light toggle service to accept all turn on params (#20912) 2019-03-07 22:33:30 +05:30
zewelor
fb820975b5 Add yeelight flow action support (#21195) 2019-02-19 19:06:40 +01:00
zewelor
2559bc4226 Add yeelight start_flow service and ability to declare custom effects (#20107) 2019-01-24 17:41:07 +01:00
Adam Mills
568c6c16fa Add missing service docs for hs_color (#13667) 2018-04-03 16:05:06 -07:00
Sebastian Muszynski
264be67787 New service added to control the power mode of the yeelight (#13267)
* New service added to control the power mode of the yeelight

* Debug output removed.

* Strict validation of the available power modes

* Service description added

* Service parameter name fixed
2018-03-27 20:29:18 +02:00
Anders Melchiorsen
14d052d242
Quote services.yaml string (#12763) 2018-02-28 00:16:49 +01:00
Sebastian Muszynski
138350fe3d Xiaomi MiIO Light: Flag the device as unavailable if not reachable (#12449)
* Unavailable state introduced if the device isn't reachable.
A new configuration option "model" can be used to define the device type.

```
light:
  - platform: xiaomi_miio
    name: Xiaomi Philips Smart LED Ball
    host: 192.168.130.67
    token: da548d86f55996413d82eea94279d2ff
    # Bypass of the device model detection.
    # Optional but required to add an unavailable device
    model: philips.light.bulb
```

New attribute "scene" and "delay_off_countdown" added.
New service xiaomi_miio_set_delay_off introduced.

* Service xiaomi_miio_set_delayed_turn_off updated. The attribute "delayed_turn_off" is a timestamp now.

* None must be a valid model.

* Math.

* Microseconds removed because of the low resolution.

* Comment updated.

* Update the ATTR_DELAYED_TURN_OFF on a deviation of 4 seconds (max latency) only.

* Import of datetime fixed.

* Typo fixed.

* pylint issues fixed.

* Naming.

* Service parameter renamed.

* New ceiling lamp model (philips.light.zyceiling) added.

* Use positive timedelta instead of seconds.

* Use a unique data key per domain.
2018-02-27 12:27:52 -08:00
Sebastian Muszynski
b10fd172fd Service for setting a fixed scene of Xiaomi MIIO lights (#10819)
* Service for setting a fixed scene introduced.

Fixes https://github.com/syssi/philipslight/issues/6.
Fixes https://github.com/home-assistant/home-assistant/issues/10458.

* Service description added.

* Typo fixed.

* Error message updated and naming improved.

* Name ("scene") of the method parameter aligned.

* Hound error fixed: Spaces removed.

* async_setup_platform method simplified.

* Lazy loading of service descriptions.

* Unused import removed.
2018-01-18 22:52:30 -08:00
Fabian Affolter
cc293db5ab
Update services.yaml files (#10229)
* Add period to the description

* Update abbreviation
2017-10-30 21:39:12 +01:00
Anders Melchiorsen
4fde0ffe9c LIFX: support for multizone (#8399)
* Make aiolifx modules easily available

* Use aiolifx features_map for deciding bulb features

Also move the feature detection out of Light so it is available even
during the initial detection.

* Move each LIFX light type to a separate class

* Simplify AwaitAioLIFX

This has become possible with recent aiolifx that calls the callback even
when a message is lost.

Now the wrapper can be used also before a Light is added though the register
callback then has to become a coroutine.

* Refactor send_color

* Add support for multizone

This lets lifx_set_state work on individual zones.

Also update to aiolifx_effects 0.1.1 that restores the state for individual
zones.
2017-07-13 19:38:36 -07:00
Anders Melchiorsen
af54311718 LIFX: Move light effects to external library (#8222)
* LIFX: Move light effects to external library

This moves the LIFX light effects to the external library aiolifx_effects.

To get the light state synchronized between that library and HA, the LIFX
platform no longer maintains the light state itself. Instead, it uses the
cached state that aiolifx maintains.

The reorganization also includes the addition of a cleanup handler.

* Fix style
2017-06-26 22:05:32 -07:00
Anders Melchiorsen
ed5f94fd8a Add kelvin/brightness_pct alternatives to light.turn_on (#7596)
* Refactor color profiles to a class

* Refactor into preprocess_turn_on_alternatives

* LIFX: use light.preprocess_turn_on_alternatives

This avoids the color_name duplication and gains support for profile.

* Add kelvin parameter to light.turn_on

* Add brightness_pct parameter to light.turn_on

* LIFX: accept brightness_pct in effects

* Add test of kelvin/brightness_pct conversions
2017-05-16 23:00:46 -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
Sean Dague
cd1655f43b create light.hue_activate_scene service (#4425)
* create light.hue_activate_scene service

This creates a light.hue_activate_scene service that takes group_name
and scene_name, and calls phue's bridge.run_scene with those
parameters. This allows calling hue bridge stored scene names by name
during automation.

This only currently works reliably in 1 hue hub configurations (which
is most of them). Phue will be further enhanced to display warnings
when it can't figure out what to do with the parameters passed in to HA.

* Update hue.py
2016-11-17 22:14:06 -08:00
Marc Pabst
138205a019 Adding support for a white value (#3338)
* Update __init__.py

addedattribute "WHITE_VALUE" to improve support for RGBW devices

* Update services.yaml

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update __init__.py

shortened line

* Update __init__.py

* Update __init__.py

* Add mysensors RGBW and light tests

* Activate support for mysensors RGBW devices with support for
	white_value attribute.
* Add white_value support in light demo platform.
* Add tests for white_value and more for light component.
* Add tests for light demo platform.
* Fix import order in check_config.
2016-09-20 21:26:40 -07:00
Robbie Trencheny
0f37d8d8eb Using alert with Hue maintains prior state (#3147)
* When using flash with hue, dont change the on/off state of the light so that it will naturally return to its previous state once flash is complete

* ATTR_FLASH not ATTR_EFFECT
2016-09-04 03:04:12 -07:00
Robbie Trencheny
a431277de1 Accept human readable color names to change light colors (#2075)
* Add support for providing color_name which accepts a CSS3 valid, human readable string such as red or blue

* Forgot the schema validation!

* ugh farcy

* use html5_parse_legacy_color for more input options

* Add webcolors==1.5 to setup.py

* Block pylint no-member errors on tuple

* add color_name_to_rgb test

* whoops

* revert changes to individual platforms

* If color_name is set, pop it off params and set rgb_color with it

* Forgot to reset wink.py

* Import the legacy function as color_name_to_rgb directly

* reset test_color.py

* Improve light services.yaml
2016-05-17 00:06:55 -07: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
richard
0dfc1c4e7a Add functionality set random color Philips Hue 2015-12-24 21:10:27 -06:00
Tom Duijf
6bad702db4 Renamed to color_temp, removed capabilities (not needed afterall) 2015-10-28 23:12:16 +00:00
Tom Duijf
e25503bc4a Hue device capabilities. Color temperature support for light component and hue platform 2015-10-27 22:34:49 +00:00
Paulus Schoutsen
4e3bd5f2a9 Add service descriptions 2015-09-26 23:17:04 -07:00