Commit Graph

8 Commits

Author SHA1 Message Date
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 d4a67e3a30 Update documentation link URL for integrations (part2) (#27117) 2019-10-02 09:34:07 -07:00
Paulus Schoutsen 33b8241d26
Add services.yaml validator (#23205)
* Add services.yaml validator

* Fix path
2019-04-18 13:40:46 -07:00
Robert Svensson b50afec5f1 Support multiple deCONZ gateways (#22449)
* Store gateways inside a dict in deconz domain

* Make reachable events gateway specific

* Gateway shall always exist

* Adapt new device signalling to support multiple gateways

* Services follow gateway master

* Working on unload entry

* Make unload and master handover work
Improve tests for init

* Fix config flow

* Fix linting

* Clean up init tests

* Clean up hassio discovery to fit with the rest

* Store gateways inside a dict in deconz domain

* Make reachable events gateway specific

* Gateway shall always exist

* Adapt new device signalling to support multiple gateways

* Services follow gateway master

* Working on unload entry

* Make unload and master handover work
Improve tests for init

* Fix config flow

* Fix linting

* Clean up init tests

* Clean up hassio discovery to fit with the rest

* Add support for services to specify bridgeid
2019-04-04 17:48:24 -07:00
Leonardo Brondani Schenkel 47003fc04f deCONZ: configure service can now use 'field' as a subpath together with 'entity' (#17722)
Allow both 'entity' and 'field' to be used simultaneously, where 'field' is used as a sub-path of the device path that is defined by 'entity'.
2018-10-26 09:15:26 +02:00
Robert Svensson 8fa9992589 Service to load new deCONZ devices without restart (#16308)
* New service to load new devices from deCONZ without restarting HASS

* Do not use len to check if list is empty

* Add support for scenes to be updated as well

* Rework refresh devices method

* Fix test
2018-09-04 09:24:42 +02:00
Kane610 8bff813014 Improve service by allowing to reference entity id instead of deconz id (#11862)
* Improve service by allowing to reference entity id instead of deconz id

* Change from having access to full entities to only store entity id together with deconz id

* Don't use eval, there is a dict type for voluptuous

* Use entity registry instead of keeping a local registry over entity ids

* Removed old code

* Add test for get_entry

* Bump dependency to v28
Fixed call to protected member

* Use chain to iterate over dict values

* Cleanup

* Fix hound comment

* Cleanup

* Follow refactoring of entity

* Revert to using a local registry

* Remove unused import

* self.hass is automatically available when entity is registered in hass
2018-02-13 16:23:03 -08:00
Kane610 b9c852392c Add deCONZ component (#10321)
* Base implementation of component, no sensors yet

* Added senor files

* First fully working chain of sensors and binary sensors going from hardware in to hass

* Clean up

* Clean up

* Added light platform

* Turning lights on and off and set brightness now works

* Pydeconz is now a proper pypi package
Stop sessions when Home Assistant is shutting down
Use a simpler websocket client

* Updated pydocstrings
Followed recommendations from pylint and flake8

* Clean up

* Updated requirements_all.txt

* Updated Codeowners to include deconz.py
Also re-added the Axis component since it had gotten removed

* Bump requirement

* Bumped to v2
Reran script/gen_requirements

* Removed global DECONZ since it wasn't relevant any more

* Username and password is only relevant in the context of getting a API key

* Add support for additional sensors

* Added support for groups

* Moved import of component library to inside of methods

* Moved the need for device id to library

* Bump pydeconz to v5

* Add support for colored lights

* Pylint and flake8 import improvements

* DATA_DECONZ TO DECONZ_DATA

* Add support for transition time

* Add support for flash

* Bump to v7

* ZHASwitch devices will now only generate events by default, instead of being a sensor entity

* Clean up

* Add battery sensor when device signals through an event

* Third-party library communicates with service

* Add support for effect colorloop

* Bump to pydeconz v8

* Same domain everywhere

* Clean up

* Updated requirements_all

* Generated API key will now be stored in a config file

* Change battery sensor to register to callback since library now supports multiple callbacks
Move DeconzEvent to hub
Bump to v9

* Improve entity attributes

* Change end of battery name to battery level
No need for static icon variable when using battery level helper

* Bump requirement to v10

* Improve pydocstring for DeconzEvent
Rename TYPE_AS_EVENT to CONF_TYPE_AS_EVENT

* Allow separate brightness to override RGB brightness

* Expose device.reachable in entity available property

* Bump requirement to 11 (it goes up to 11!)

* Pylint comment

* Binary sensors don't have unit of measurement

* Removed service to generate API key in favor of just generating it as a last resort of no API key is specified in configuration.yaml or deconz.conf

* Replace clear text to attribute definitions

* Use more constants

* Bump requirements to v12

* Color temp requires xy color support

* Only ZHASwitch should be an event

* Bump requirements to v13

* Added effect_list property

* Add attribute to battery sensor to easy find event id

* Bump requirements to v14

* Fix hound comment

* Bumped requirements_all information to v14

* Add service to configure devices on deCONZ

* Add initial support for scenes

* Bump requirements to v15

* Fix review comments

* Python doc string improvement

* Improve setup and error handling during setup

* Changed how to evaluate light features

* Remove 'ghost' events by not triggering updates if the signal originates from a config event
Bump requirement to v17

* Fix pylint issue by moving scene ownership in to groups in requirement pydeconz
Bump requirement to v18

* Added configurator option to register to deCONZ when unlocking gateway through settings
Bump requirement to v20

* Improve async configurator

* No user interaction for deconz.conf

* No file management in event loop

* Improve readability of load platform

* Fewer entity attributes

* Use values() instead of items() for dicts where applicable

* Do one add devices per platform

* Clean up of unused attributes

* Make sure that discovery info is not None

* Only register configure service and shutdown service when deconz has been setup properly

* Move description

* Fix lines longer than 80

* Moved deconz services to a separate file and moved hub to deconz/__init__.py

* Remove option to configure switch as entity

* Moved DeconzEvent to sensor since it is only Switch buttonpress that will be sent as event

* Added support for automatic discovery of deconz
Thanks to Kroimon for adding support to netdisco

* Use markup for configuration description

* Fix coveragerc

* Remove deCONZ support from Hue component

* Improved docstrings and readability

* Remove unnecessary extra name for storing in hass.data, using domain instead

* Improve readability by renaming all async methods
Bump to v21 - improved async naming on methods

* Fix first line not being in imperative mood

* Added logo to configurator
Let deconz.conf be visible since it will be the main config for the component after initial setup

* Removed bridge_type from new unit tests as part of removing deconz support from hue component

* Capitalize first letters of Battery Level

* Properly update state of sensor as well as reachable and battery
Bump dependency to v22

* Fix flake8 Multi-line docstring closing quotes should be on a separate line

* Fix martinhjelmares comments

Bump dependency to v23
Use only HASS aiohttp session
Change when to use 'deconz' or domain or deconz data
Clean up unused logger defines
Remove unnecessary return values
Fix faulty references to component documentation
Move callback registration to after entity has been initialized by HASS
Less inception style on pydocs ;)
Simplify loading platforms by using a for loop
Added voluptous schema for service
Yaml file is for deconz only, no need to have the domain present
Remove domain constraint when creating event title
2018-01-01 17:08:13 +01:00