* Initial hlk-sw16 relay switch support
* remove entity_id and validate relay id's
* Bump hlk-sw16 library version and cleanup component
* refactor hlk-sw16 switch platform loading
* Use voluptuous to coerce relay id to string
* remove force_update for SW16Switch
* Move to callback based hlk-sw16 relay state changes
* fix hlk-sw16 default port and cleanup some unused variables
* Refactor to allow registration of multiple HLK-SW16 device
* Store protocol in instance variable instead of class variable
* remove is_connected
* flake8 style fix
* Move reconnect logic into HLK-SW16 client library
* Cleanup and improve logging
* Load hlk-sw16 platform entities at same time per device
* scope SIGNAL_AVAILABILITY to device_id
* Fixes for connection resume
* move device_client out of switches loop
* Add timeout for commands and keep alive
* remove unused variables
* Added lightwave components for switches and lights.
* Address warnings raised by Hound
* Correcting lint messages and major typo. This time tested before commit.
* Trying to fix author
* Minor lint changes
* Attempt to correct other lint error.
* Another lint attempt.
* More lint issues.
* Last two lint errors! Hurrah.
* Changes after review from fabaff.
* Moved device dependent code to PyPi.
* Replaced DEPENDENCIES with REQUIREMENTS
* Updated following code review from Martin Hjelmare.
* Added lightwave to requirements_all.txt
* Omit lightwave from tests.
* Updated requirements_all.txt
* Refactored how lightwave lights and switches load.
* Removed imports that were no longer required.
* Add guard for no discovery_info.
* Make it a guard clause and save indentation. Rename LRFxxx to LWRFxxx.
* Sorted imports to match style guidelines.
* Correct return value.
* Update requirements_all.txt
* Catch case where we have no lights or switches configured.
* Improve configuration validation.
* Added Entur departure information sensor.
* Fixed houndci-bot comments.
* Removed tailing whitespace.
* Fixed some comments from tox lint.
* Improved docstring, i think.
* Fix for C1801
* Unit test for entur platform setup
* Rewritten entur component to have pypi dependecy.
* Propper client id for api usage.
* Minor cleanup of usage of constants.
* Made location output configurable.
* Cleaned up usage of constants.
* Moved logic to be contained within setup or update methods.
* Moved icon consts to root in module.
* Using config directly in test
* Minor changes
* Added Zones, and removed available() logic
flesh out Zones
tidy up init
some more tidying up
Nearly there - full functionality
passed txo - ready to send PR
Ready to PR, except to remove logging
Add Zones and associated functionality to evohome component
Add Zones to evohome (some more tidying up)
Add Zones to evohome (Nearly there - full functionality)
Add Zones to evohome (passed tox)
Add Zones to evohome (except to remove logging)
Add Zones and associated functionality to evohome component
Revert _LOGGER.warn to .debug, as it should be
Cleanup stupid REBASE
* removed a duplicate/unwanted code block
* tidy up comment
* use async_added_to_hass instead of bus.listen
* Pass evo_data instead of hass when instntiating
* switch to async version of setup_platform/add_entities
* Remove workaround for bug in client library
- using github version for now, as awaiting new PyPi package
* Avoid invalid-name lint - use 'zone_idx' instead of 'z'
* Fix line too long error
* remove commented-out line of code
* fix a logic error, improve REDACTION of potentially-sensitive infomation
* restore use of EVENT_HOMEASSISTANT_START to improve HA startup time
* added a docstring to _flatten_json
* Switch instantiation from component to platform
* Use v0.2.8 of client api (resolves logging bug)
* import rather than duplicate, and de-lint
* We use evohomeclient v0.2.8 now
* remove all the api logging
* Changed scan_interal to Throttle
* added a configurable scan_interval
* small code tidy-up, removed sub-function
* tidy up update() code
* minimize use of self.hass.data[]
* remove lint
* remove unwanted logging
* remove debug code
* correct a small coding error
* small tidyup of code
* remove flatten_json
* add @callback to _first_update()
* switch back to load_platform
* adhere to standards fro logging
* use new format string formatting
* minor change to comments
* convert scan_interval to timedelta from int
* restore rounding up of scan_interval
* code tidy up
* sync when in sync context
* fix typo
* remove raises not needed
* tidy up typos, etc.
* remove invalid-name lint
* tidy up exception handling
* de-lint/pretty-fy
* move 'status' to a JSON node, so theirs room for 'config', 'schedule' in the future
* Awair Sensor Platform
This commit adds a sensor platform for Awair devices, by accessing
their beta API. Awair heavily rate-limits this API, so we throttle
updates based on the number of devices found. We also allow for the
user to bypass API device listing entirely, because the device list
endpoint is limited to only 6 calls per day. A crashing or restarting
server would quickly hit that limit.
This sensor platform uses the python_awair library (also written
as part of this PR), which is available for async usage.
* Disable pylint warning for broad try/catch
It's true that this is generally not a great idea, but we really don't
want to crash here. If we can't set up the platform, logging it and
continuing is the right answer.
* Add space to satisfy the linter
* Awair platform PR feedback
- Bump python_awair to 0.0.2, which has support for more granular exceptions
- Ensure we have python_awair available in test
- Raise PlatformNotReady if we can't set up Awair
- Make the 'Awair score' its own sensor, rather than exposing it other ways
- Set the platform up as polling, and set a sensible default
- Pass in throttling parameters to the underlying data class, rather
than use hacky global variable access to dynamically set the interval
- Switch to dict access for required variables
- Use pytest coroutines, set up components via async_setup_component,
and test/modify/assert in generally better ways
- Commit test data as fixtures
* Awair PR feedback, volume 2
- Don't force updates in test, instead modify time itself and let
homeassistant update things "normally".
- Remove unneeded polling attribute
- Rename timestamp attribute to 'last_api_update', to better reflect
that it is the timestamp of the last time the Awair API servers
received data from this device.
- Use that attribute to flag the component as unavailable when data
is stale. My own Awair device periodically goes offline and it really
hardly indicates that at all.
- Dynamically set fixture timestamps to the test run utcnow() value,
so that we don't have to worry about ancient timestamps in tests
blowing up down the line.
- Don't assert on entities directly, for the most part. Find desired
attributes in ... the attributes dict.
* Patch an instance of utcnow I overlooked
* Switch to using a context manager for timestream modification
Honestly, it's just a lot easier to keep track of patches. Moreover,
the ones I seem to have missed are now caught, and tests seem to
consistently pass.
Also, switch test_throttle_async_update to manipulating time more
explicitly.
* Missing blank line, thank you hound
* Fix pydocstyle error
I very much need to set up a script to do this quickly w/o tox, because
running flake8 is not enough!
* PR feedback
* PR feedback
* Enable native support + ADB authentication for Fire TV
* Remove unnecessary underscore assignments
* Bump firetv to 1.0.5.3
* Change requirements to 'firetv>=1.0.6'
* Change requirement from 'firetv>=1.0.6' to 'firetv==1.0.6'
* Address pylint errors
* Ran 'python script/gen_requirements_all.py'
* Address some minor reviewer comments
* Run 'python script/gen_requirements_all.py'
* Just use the 'requirements_all.txt' and 'requirements_test_all.txt' from the 'dev' branch...
* Edit the 'requirements_all.txt' file manually
* Pass flake8 tests
* Pass pylint tests, add extended description for 'select_source'
* More precise exception catching
* More Pythonic returns
* Import exceptions inside '__init__'
* Remove 'time.sleep' command
* Sort the imports
* Use 'config[key]' instead of 'config.get(key)'
* Remove accessing of hidden attributes; bump firetv version to 1.0.7
* Bump firetv to 1.0.7 in 'requirements_all.txt'
* Don't access 'self.firetv._adb', use 'self.available' instead
* Remove '_host' and '_adbkey' attributes
* Create the 'FireTV' object in 'setup_platform' and check the connection before instantiating the entity
* Fixed config validation for 'adbkey'
* add_devices -> add_entities
* Remove 'pylint: disable=no-name-in-module'
* Don't assume the device is available after attempting to connect
* Update the state after reconnecting
* Modifications to 'adb_decorator'
* Modifications to 'setup_platform'
* Don't update the state if the ADB reconnect attempt was unsuccessful
* 'return None' -> 'return'
* Use 'threading.Lock()' instead of a boolean for 'adb_lock'
* Use a non-blocking 'threading.Lock'
* Initial stuff
* More work in place
* Starting with tests
* Device registry in place
* Hound
* Linting
* Member comments (including extracting device registry)
* Member comments (plus I forgot cleanup!)
* Hound
* More Hound
* Removed old import
* Adding config entry test to coverage
* Updated strings
* Fibaro HC connection, initial commit
Very first steps working, connects, fetches devices, represents sensors, binary_sensors and lights towards HA.
* Cover, switch, bugfixes
Initial support for covers
Initial support for switches
Bugfixes
* Some cleanup and improved lights
pylint based cleanup
light switches handled properly
light features reported correctly
* Added status updates and actions
Lights, Blinds, Switches are mostly working now
* Code cleanup, fiblary3 req
Fiblary3 is now in pypi, set it as req
Cleanup based on pylint
* Included in .coveragerc and added how to use guide
Included the fibaro component in coveragerc
Added usage instructions to file header
* PyLint inspired fixes
Fixed pylint warnings
* PyLint inspired fixes
PyLint inspired fixes
* updated to fiblary3 0.1.5
* Minor fixes to finally pass pull req
Fixed fiblary3 to work with python 3.5
Updated fiblary3 to 0.1.6
(added energy and batteryLevel dummies)
* module import and flake8 fixes
Finally (hopefully) figured out what lint is complaining about
* Fixed color support for lights, simplified callback
Fixed color support for lights
Simplified callback for updates
Uses updated fiblary3 for color light handling
* Lean and mean refactor
While waiting for a brave reviewer, I've been making the code smaller and easier to understand.
* Minor fixes to please HoundCI
* Removed unused component
Scenes are not implemented yet
* Nicer comments.
* DEVICE_CLASS, ignore plugins, improved mapping
Added support for device class and icons in sensors and binary_sensors
Improved mapping of sensors and added heuristic matching
Added support for hidden devices
Fixed conversion to float in sensors
* Fixed dimming
Fibaro apparently does not need, nor like the extra turnOn commands for dimmers
* flake8
* Cleanup, Light fixes, switch power
Cleanup of the component to separate init from connect, handle connection error better
Improved light handling, especially for RGBW strips and working around Fibaro quirks
Added energy and power reporting to switches
* Missing comment added
Missing comment added to please flake8
* Removed everything but bin.sensors
Stripdown, hoping for a review
* better aligned comments
OMG
* Fixes based on code review
Fixes based on code review
* Implemented stopping
Implemented stopping of StateHandler thread
Cleanup for clarity
* Minor fix
Removed unnecessary list copying
* Nicer wording on shutdown
* Minor changes based on code review
* minor fixes based on code review
* removed extra line break
* Fix and improvment of Swiss Hydrological Data component
* changed component to get data from a REST API rather than from crawling the website
* fixed several issues and lint errors
* Fix and improvment of Swiss Hydrological Data component
* Minor changes
- Simplify the sensor configuration (expose value as attributes rather than sensor)
- Make the setup fail if station is not available
- Add unique ID
- Prepare for config flow
* Add srp_energy
* Update message on TypeError. Add check for None state.
* Add check for none in history
* Add srpenergy to Test requirements.
* Add srpenergy to requirments.
* Change = to ==.
* Change import for srpenergy
* Fix Flak8 errors
* Add srp to gen requirements script
* Change config name.
* Add daily usage test
* Add test for daily usage.
* Fix Flake8 message.
* Remove blank after docstring.
* Add srpenergy to coverage
* Bump requires version to srpenergy
* Fix type in coverage. Import from Sensor. Use dict.
* Update to 1.0.5. Check credentials on setup. Standalone test.
* Fix formating.
* Remove period. Rename _ variables.
* Fix rebase merge
* Add rebase requirement
* Improve Mock Patching.
* Initial commit of w800rf32 component and binary_sensor.
The W800 family is an X10 RF receiver used with keypads and motion sensors etc.
* Initial commit of w800rf32 switch platform.
The W800 family is an X10 RF receiver used with keypads and motion sensors etc.
* Remove unused code.
* Additions for w800rf32 component and platform code
* Fix w800rf32 minor lint issues and make sure gen_requirements.py correctlly adds w800rf32
* Added dispatch_connect/send and refactor somewhat
* Fix missed indentation lint
* Removed shared entity dict and use async_dispatch code
* Fix long line not caught by lint
* One more line too long, missed it
* Remove unused code and changes for async
* Remove @callback that shouldn't be there.
* Remove switch platform, can't have read only switch.
* Remove unused CONF_DEBUG
* Remove used vars and make CONF_DEVICES required
* Move CONF_OFF_DELAY to platform, only used there
* Add new launch sensor to keep track of space launches.
* Added attribution to Launch Library.
* Adds data class and throtle, reuse aiohttp session.
* Add one extra blank line before the new class..
* Change throttle to simpler SCAN_INTERVAL.
* Remove the usage of the LaunchData class.
* Bump pylaunches, remove . from log, fix line breaker for agency_country_code, remove CONF_ from ATTRIBUTION.
* Adds upload and download sensors for asuswrt and makes it a component.
* Rebase
* removes warnings
* Fixing review issues
* More robust connection phase
* Generate dependencies
* Not needed try catch
* Rename sensors
* Revorked tests so they can be turned on again
* Using component setup
* Test through correct setup
* Forgot we dont need to worry about older py
In 0.7.x the API to HDate was cleaned up so as to move logic from homeassistant to
the HDate external library.
This commit removes all the superfluous code, updates the required tests and changes the
requirement from version 0.6.5 to 0.7.5
* Adds support for Lupusec alarm control panel
* fixed various mostly cosmetic issues
* fixed generic type of binary sensors
* fixed some formatting; removed scan interval completely -> defaults now to 2 secs
* removed unused data caches; added check if binary sensor class exists
* cosmetics
* generic type fix
* small fix
* small fixes
* guard clause added
* small fixes
* Add Norwegian Public Transportation sensor (Ruter).
* Corrected typo.
* change stopid to stop_id, actually use attributes, changed logging, corrected link, removed unused variable.
* Change to RuterSensor for the class, and move logic to me more readable.
* Use correct sensor class.
* Add return if blank list, remove else
* Added eco mode option to Ziggo Mediabox XL
* Changed eco_mode_on to eco_mode
* Removed eco_mode option, the player is unavailable when offline
* Timeout on connection, on/off states are handled via update
* Improved state detection and added available property
* Add support for Google Home device tracking.
* Use dict[key] for options.
* Delete googlehome.py.save
* Change stylling of name, and attr mac_address to btle_mac_address, removed unesssesarry attributes copying.
* Implemented tplink_lte components and notify service
* Device discovery for the notify component
* Improved the config schema. Small fixes
* Improved login retry mechanism
* Log successful connection only on retries
* Removed CancelledError handlers and small fixes
* Refactor mysensors message handling
* Add handler module and register handlers per message type or message
sub-type. This will allow easier extension of message handling in the
future.
* Move some common functions to a helpers module.
* Add node handler and signal
* Fix inconsistent return
* Upgrade pymysensors to 0.18.0
* Fix bug in message modification.
* notify.xmpp: first working http upload
* extension guessing for upload
* docstrings, flake8, pylint
* hass.async_add_executor_job(...)
* catch more errors, allow unverified SSL request
allow user to specify unverified SSL request to URL
cleaner code
catch more exceptions
* pylint
* catching XMPP exceptions, timeout for requests call
removed calls for roster and presence
added timeout for upload request call
cleared up debug, info, warning messages
cleared up requests call for secure and insecure retrieval of image
catching IqError, IqTimeout, XMPPError from slixmpp
docstring updated
* added timout for http upload of local files
* timeout, mimetypes, random filenames
guessing filetypes and mimetypes with stdlib mimetypes
setting a random filename for privacy
working around slixmpp timeout issues with asyncio.wait_for
* code cleanup
* added file upload for rooms/groupchats
* version bump for slixmpp to 1.4.1
added NotConnectedError, removed double catches of IqErrors
removed asyncio import
* slixmpp 1.4.1 in requirements_all
* added url and path templating
* Minor changes
* fixed review requests
fixed possible path issue for foo/../bar/ paths
fixed possible access for non-whitelisted files
fixed None or X
fixed try-else block, moved else block into try
fixed raising error in upload_file if url is None
fixed using data.get after it's already been checked
fixed added docstring for tiny get_url function
* Adds Tautulli as a sensor platform.
* Remove blank last line.
* Rewrite the platform to comply with review.
* Linting issues.
* Remove tailing newline.
* Corrected typo
* Correcte check_connection, removed wierd defaults, added line in imports, removed unused var, use the correct user list.
* Use dict[key] for required config options.
* Minor changes
* initial tensorflow image_processing component
* linting fixes
* make displayed attribute a summary of objects
* fix missed merge conflict and add warning supression back in for CPU type
* restructure tensorflow component to install on the fly, remove from Docker
* add both matches and summary as attributes
* address review comments
* do not use deps folder as default, as it should only be managed by HA. Update to have tensorflow in root config directory
* Added error handling for sense API timeouts
* Moved imports in function
* Moved imports to more appropriate function
* Change exception to custom package version
* Updated sense_energy library to 0.4.2
* Added binary sensors for individual devices
* Whitespace updates
* Split into component, sensors, binary sensors
* Fixed whitespace
* Fixed whitespace
* Moved time constant into sensor file
* Regenerated requirements
* Fixed whitespace
* Updated component dependency
* Fixed whitespace
* Code cleanup
* High and low target temps are also supported if target is supported
* Revert "High and low target temps are also supported if target is supported"
This reverts commit 66b33dc2b8.
* Added all sense components to .coveragerc
* Added check authentication exception
* binary/sensor platforms loaded in setup
* Changed to add all detected devices
* Changed to add all sensors on setup
* Code cleanup
* Whitespace
* Whitespace
* Added sense as requirement for platform
* pylint fixes
* Whitespace
* Switched requirement to dependency
* Made non-class function
* Whitespace
* Removed unneeded checks
* Increased API delay to 60 seconds
* Added guard clause for discovery_info
* Tidy code
* Whitespace