Commit Graph

198 Commits (e45f2cf5a298251b511105019b357aae0db53f46)

Author SHA1 Message Date
Paulus Schoutsen 5b7daa9e0c
Hue: Guard for when there is no brightness (#35151) 2020-05-03 19:21:10 -04:00
HomeAssistant Azure 78f846d532 [ci skip] Translation update 2020-05-03 00:02:26 +00:00
HomeAssistant Azure bd72ddda3c [ci skip] Translation update 2020-05-01 00:02:55 +00:00
HomeAssistant Azure 5d37eb8eeb [ci skip] Translation update 2020-04-30 00:03:17 +00:00
HomeAssistant Azure 7faba60e83 [ci skip] Translation update 2020-04-29 00:03:31 +00:00
HomeAssistant Azure e13f78dfc5 [ci skip] Translation update 2020-04-28 00:04:52 +00:00
HomeAssistant Azure aa2bfbb541 [ci skip] Translation update 2020-04-27 00:02:20 +00:00
Erik Montnemery e4333a7a44
Rename Light to LightEntity (#34593) 2020-04-26 18:49:41 +02:00
HomeAssistant Azure 90e0a1af8a [ci skip] Translation update 2020-04-26 00:02:45 +00:00
HomeAssistant Azure 5f775c1427 [ci skip] Translation update 2020-04-25 00:08:30 +00:00
Erik Montnemery b022e08db9
Rename BinarySensorDevice to BinarySensorEntity (#34462)
* Rename BinarySensorDevice to BinarySensorEntity

* Tweak

* Move deprecation warning to __new__, add test

* Move deprecation warning back to __init__

* Move deprecation warning to __init_subclass
2020-04-23 21:57:07 +02:00
Joakim Sørensen 730a257f3c
Rename translations dir for integrations (#34494) 2020-04-21 16:11:05 -07:00
Paulus Schoutsen 95357dfc55 Update translations 2020-04-20 16:33:54 -07:00
HomeAssistant Azure 6d7fb9f46a [ci skip] Translation update 2020-04-20 00:04:37 +00:00
HomeAssistant Azure 5007a9e702 [ci skip] Translation update 2020-04-18 00:04:07 +00:00
Eugenio Panadero 813f8dd63f
Fix missing events for hue remotes (#34340) 2020-04-17 09:48:36 -07:00
HomeAssistant Azure a6e9933236 [ci skip] Translation update 2020-04-17 00:09:03 +00:00
Save me 5dcac36b78
Add Friends of Hue Switch - Model FOHSWITCH (ZGPSWITCH) (#34195) 2020-04-16 14:14:57 -07:00
Paulus Schoutsen 0d60d40512 Update translations 2020-04-16 13:00:10 -07:00
Paulus Schoutsen 94a3cec4bf
Take integration title from manifest if not translated (#34283) 2020-04-16 08:38:54 -07:00
HomeAssistant Azure 0d8c75d9ce [ci skip] Translation update 2020-04-16 00:04:36 +00:00
Paulus Schoutsen f06aeea385 Update translations 2020-04-15 09:51:07 -07:00
Paulus Schoutsen d36204a968
Move title translation to root (#33850) 2020-04-15 09:41:18 -07:00
Paulus Schoutsen 6fa29d6e2e
Fix Hue brightness values over 127 off by one (#34190) 2020-04-14 13:31:38 +02:00
HomeAssistant Azure 32e87fc4c7 [ci skip] Translation update 2020-04-11 00:03:44 +00:00
springstan fb8f8133a0
Use HTTP_INTERNAL_SERVER_ERROR constant (#33832) 2020-04-08 23:20:03 +02:00
Paulus Schoutsen ba8ae17487
Fix hue ct (#33791) 2020-04-08 11:31:41 +02:00
Franck Nijhof 39336d3ea3
Add prettier (in pre-commit and CI) (#33693)
* Add prettier (in pre-commit and CI)

* Make all file prettier

* Change order

* Add to Azure Pipelines

* Fix a YAML file prettier caught as invalid

* Remove flow mapping using curly braces from all YAML service files
2020-04-05 17:27:16 +02:00
Franck Nijhof 7653dc947a
Enable pylint unnecessary-pass (#33650)
* Enable pylint unnecessary-pass

* Process review suggestions

* Fix smhi tests
2020-04-05 10:33:07 +02:00
HomeAssistant Azure d267d674b9 [ci skip] Translation update 2020-04-05 00:03:15 +00:00
Paulus Schoutsen 0a3ec6fea1
Correct Hue mireds for lights (#33597) 2020-04-04 14:29:03 -07:00
Franck Nijhof 7d3c974747
Use set & dict literals (#33636)
Co-authored-by: Daniel Høyer Iversen <mail@dahoiv.net>
2020-04-04 20:05:15 +02:00
HomeAssistant Azure 8a8ee95336 [ci skip] Translation update 2020-04-04 00:07:23 +00:00
Paulus Schoutsen f1d3c0d19b
Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07:00
Paulus Schoutsen dc7127aacf
Data Coordinator to return unsub func (#33588) 2020-04-03 20:15:42 +02:00
HomeAssistant Azure 08c9ceb752 [ci skip] Translation update 2020-04-03 00:04:03 +00:00
HomeAssistant Azure 4a4496b21d [ci skip] Translation update 2020-04-02 00:04:41 +00:00
Eugenio Panadero 71aaf2d809
Add device triggers for Hue remotes (#33476)
* Store device_registry entry id in HueEvent

so it can be retrieved with that key when using device triggers

* Add device_trigger for hue_event from hue remotes

* supporting Hue dimmer switch & Hue Tap
* State mapping and strings are copied from deCONZ

* refactor mock_bridge for hue tests

and also share `setup_bridge_for_sensors`
for test_sensor_base and test_device_trigger.

* Add tests for device triggers with hue remotes

* Remove some triggers
2020-04-01 11:42:22 -07:00
Eugenio Panadero f5cbc9d208
Fire events for hue remote buttons pressed (#33277)
* Add remote platform to hue integration

supporting ZGPSwitch, ZLLSwitch and ZLLRotary switches.

* Ported from custom component Hue-remotes-HASS from @robmarkcole

* Add options flow for hue, to toggle handling of sensors and remotes

* Sensors are enabled by default, and remotes are disabled,
  to not generate any breaking change for existent users.
  Also, when linking a new bridge these defaults are used,
  so unless going explicitly to the Options menu,
  the old behavior is preserved.
* SensorManager stores the enabled platforms and ignores everything else.
* Bridge is created with flags for `add_sensors` and `add_remotes`,
  and uses them to forward entry setup to only the enabled platforms.
* Update listener removes disabled kinds of devices when options are changed,
  so device list is in sync with options, and disabled kinds disappear from HA,
  leaving the enable/disable entity option for individual devices.

* Fix hue bridge mock with new parameters

* Revert changes in hue bridge mock

* Remove OptionsFlow and platform flags

* Extract `GenericHueDevice` from `GenericHueSensor`

to use it as base class for all hue devices, including those without any entity,
like remotes without battery.

* Add `HueBattery` sensor for battery powered remotes

and generate entities for TYPE_ZLL_ROTARY and TYPE_ZLL_SWITCH remotes.

* Remove remote platform

* Add HueEvent class to fire events for button presses

* Use `sensor.lastupdated` string to control state changes
* Event data includes:
  - "id", as pretty name of the remote
  - "unique_id" of the remote device
  - "event", with the raw code of the pressed button
    ('buttonevent' or 'rotaryevent' property)
  - "last_updated", with the bridge timestamp for the button press
* Register ZGP_SWITCH, ZLL_SWITCH, ZLL_ROTARY remotes

* fix removal

* Exclude W0611

* Extract GenericHueDevice to its own module

and solve import tree, also fixing lint in CI

* Store registered events to do not repeat device reg

* Minor cleaning

* Add tests for hue_event and battery entities for hue remotes
2020-03-31 10:27:30 -07:00
HomeAssistant Azure 5bedc4ede2 [ci skip] Translation update 2020-03-29 00:04:45 +00:00
Eugenio Panadero bb68e7a532
Bump aiohue version to 2.1.0 (#33234) 2020-03-25 09:11:00 -07:00
HomeAssistant Azure 763ed0dc7b [ci skip] Translation update 2020-03-24 13:18:47 +00:00
Eugenio Panadero 94b6ab2862
Use platform tag to register components on hue SensorManager (#32732)
* Use platform tag to register components on hue SensorManager

instead of a boolean flag to decide between sensor and binary sensor,
so it could be used externally (or to get ready for inclusion of other comps)

* Make new item discovery platform agnostic for SensorManager
2020-03-12 18:31:39 -07:00
Paulus Schoutsen b27c46750c
Update error handling in update coordinator (#32452) 2020-03-04 08:05:46 -08:00
Paulus Schoutsen 5a56d0ec1d
Catch more Hue errors (#32275) 2020-02-27 12:53:36 -08:00
Ville Skyttä 9b2544c923
Remove some unneeded pylint suppressions (#32152) 2020-02-24 16:47:15 -08:00
HomeAssistant Azure 8257165562 [ci skip] Translation update 2020-02-23 00:31:50 +00:00
Paulus Schoutsen e71c7e1f5e Fix hue test 2020-02-20 08:11:27 -08:00
Victor Guimarães 93a844b1d5
Hue Group features based on the bulbs in it (#31897)
* Computes the features of a hue group as the union of the features of the bulbs in the group

* Moved create item to a function

* Added test for hue group features
2020-02-17 10:22:34 -08:00
Paulus Schoutsen b77f2670a7
Upgrade aiohue (#31903) 2020-02-17 09:52:54 +01:00