* Enhance python_script to support "_getitem_"
In order to use dict / list structures in python scripts we need
_getitem_ allowed in the RestrictedPython environment. There is a
default_guarded_getitem included with RestrictedPython, which is a
pass through used in the Eval code paths.
* Add tests for dict/list support in python_scripts
* Lint
* Added a service to write to KNX group addressed including documentation
* Define parameters as required
* Reformating
* Moved service documentation to service.yaml
* Moved service documentation to services.yaml
* Update knx.py
* Upgrade the alarmdecoder dependency library from 0.12.1 to 0.12.3. Nutech software who owns this library have upgraded this library with some fixes regarding arming it to home/away and then disarming the alarm. Without this upgraded library, HASS is having a problem when we try to disarm an armed alarm after around 8 hours or so.
* Updated the requirements_all.txt by running the script gen_requirements_all.py
* Add support for different stream formats
* Encapsulate logic inside MediaExtractor class
* Add CONFIG_SCHEMA
* Fix for cases when youtube-dl returns content of playlist as list
* Some images are not supported by face_recognition, so this patch treats the error
messages instead throwing a traceback. Fixes#7867
* Makes lint happy
* Initial support for Google Wifi/OnHub
* Moved state logic to update function of API class
- Throttle added to update
- State logic implementation is cleaner
- Modified tests to work with the new throttle on update
* Return a 0 temperature value when none is found
It's well documented that these TRVs will only return the current temperature
for a short time after the actuator has moved. This means that, usually, they will
not return the current temperature. Setting a non-value here causes errors in the logs
and for the TRV to not show on the dashboard at all
* Fix lint issue
The citibykes API returns "null" as value for empty_slots on some
stations (see #8527). This causes the component to not process the data.
This is fixed by accepting None as valid data. The row in the frontend
is left empty if "null" was returned by the service.
fixes#8527
data may be None if twitter data property unconfigured:
File "/opt/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/notify/twitter.py", line 63, in send_message
media = data.get(ATTR_MEDIA)
* Fix TP-Link device tracker regression since 0.49
This regression was introduced by #8322.
Fix is to utf encode the password like the other TP-Link backends do.
* Fix linting issue introduced in previous commit
Commit in question: 677f3fbb7f
* Make it available during state paused.
* Don't adjust for media_position_updated_at. I.e. do as vlc, sonos etc
so that returned position is the position at the time of
media_position_updated_at, not now.
* 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.
* Make it available during state paused.
* Don't adjust for media_position_updated_at. I.e. do as vlc, sonos etc
so that returned position is the position at the time of
media_position_updated_at, not now.
* 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.
* Use pip install --user if venv not active
* Set PYTHONUSERBASE to deps directory, when installing with --user
option.
* Reset --prefix option to workaround incompatability when installing
with --user option. This requires pip version 8.0.0 or greater.
* Require pip version 8.0.3.
* Do not delete deps directory on home assistant upgrade.
* Fix local lib mount and check package exist.
* Update and add tests
* Fix upgrade from before version 0.46
* Extract function to get user site
* Add function(s) to package util to get user site.
* Use async subprocess for one of the functions to get user site.
* Add function to package util to check if virtual environment is
active.
* Add and update tests.
* Update version for last removal of deps dir
* Address comments
* Rewrite package util tests with pytest
* Rewrite all existing unittest class based tests for package util as
test functions, and capitalize pytest fixtures.
* Add test for installing with target inside venv.
The default aiolifx timers are tuned for a network with few lost packets.
This means that lights can become "unavailable" from just a two second
dropout. An unavailable light is completely useless for HA until it is
rediscovered so this is an undesirable state to be in.
These tweaks make aiolifx try harder to get its messages through to the
bulbs, at the cost of some latency in detecting lights that actually are
unavailable.
* This change will enable the functionality for Arlo Q cameras. When we added the code to enable/disable motion detection, we assumed that base station will be present for all arlo type of cameras. But found recently that Arlo Q cameras does not have base station. So, removed the base_station dependency in the init code. Also added code in enable/disable motion detection code to first check if base station is detected by library. If base station is detected then it will use it to enable the motion detection. If not detected, even if service was called, it will not do anything. Enabling/disabling the motion detection for Arlo Q cameras have to added by someone who has that camera. I don't have the Arlo Q cameras.
* Fixed a typo in the code.
* Added support for temperature_offset and humidity_offset
Some DHT sensors require some offsets to work.
* Support for temperature and humidity offset
* Changed lines with 79 characters
* Moved const to dht.py from const.py
* Changed temperature_offset range
* Removed the const
const.py is at original state.
* Fixed continuation line under-indented
* Removed first round and added debug info
* Fix -1 value issue
Fixed issue where thermostat will sometimes return a current temperature or set temperature value of -1
* Update radiotherm.py
* Update radiotherm.py
* Update radiotherm.py
Added retry limit
* Update radiotherm.py
* Update radiotherm.py
* Refactored Amcrest to use central hub component
* Set default streaming source to snapshot
* Simplified code by using discovery platforms
* Makes lint happy
* Update authentication method to basic
* Fixed lint issues
* Makes Amcrest hub async
* Make Amcrest hub IO synchronous and disabled ffmpeg dependency on sensor/amcrest.
* Removed async to load component
* Organized import order
* Update amcrest.py
Prometheus (https://prometheus.io/) is an open source metric and alerting
system. This adds support for exporting some metrics to Prometheus, using
its Python client library.
bellows 0.3.0 changes the API to have both, renaming the attribute which used
to be for input clusters in the process.
This is in preparation for remotes.
* Allow notifications to include media, with Twitter as the first implementation. The Twitter notifier uses the Twitter-recommended async chunked media/upload approach and tries to convey the correct mime type of the media. Twitter implementation based on https://github.com/geduldig/TwitterAPI/blob/master/examples/upload_video.py.
* Changes based on balloob's review:
balloob: "Please remove this file. We fixed the issue in our tests that left this artifact."
balloob: "…prefer a guard clause"
balloob: "This is very inefficient. You are now generating up to 99 values."
balloob: "Since media_id is going to be None, why not just return None and you can remove the else."
* balloob: "Other notify platforms are using ATTR_DATA for it. That way if a platform requires extra metadata, we don't need to add extra fields. So please add it to Twitter via ATTR_DATA."
* New service `send_magic_packet` in new component `wake_on_lan`
* fix
* Unit tests for new component wake_on_lan
* Add wakeonlan to tests requirements
* remove wakeonlan from tests requirements and remake the component tests
* remove wakeonlan from tests requirements
* link domain and service names to component
* fix mocking in test_setup_component
* send_magic_packet as coroutine, better use of mock_calls in tests
* fix imports
* review changes
* better async calls
* Update test_wake_on_lan.py
This commit adds support for the set_operation_mode system call to the
generic thermostat component. This enables users to set whether the
thermostat is enabled or not by either setting it to auto or off.
* New component to connect to VELUX KLF 200 Interface
* Issue #8203: modifications as suggested by hound
* Issue #8203: added entries to .coveragerc
* moving velux/__init__p.y to velux.py
* Issue #8203: Using hass.data for storing global object, updated docstrings
* Issue #8203: validation of config, using standard approach for getting config values
* Issue #8203: Exception handling if connection to velux component fails
* Issue #8203: removed unused import
* Issue #8203: Some minor changes within docstrings
* Issue #8203: Some minor changes within docstrings
* Issue #8203: added dependency for pyvlx to requirements_all.txt
* Issue #8203: less broad exception
* Issue #8203: increased version
* Issue #8203: changed position of pyvlx within requirements_all.txt
* Issue #8203: bumped version of pyvlx to 0.1.3 (better handling of retries when token expires)
* reset pointer to home-assistant-polymer
* Issue #8203: modifications as suggested by fabaff
* hound *sigh*
* use upstream RachioPy, fix manual run switches
* Update requirements for PyPi version of rachiopy
* Use upstream RachioPy 0.1.2 (partial revert of 39c6484d89)
* Revert rachiopy downgrade
* First version of a LaMetrci platform with a Notify module
* Cleanup, fix formatting bugs
* More formatting
* Formatting
* Updated requirements
* formatting
* Formatting
* More formatting
* Dummy commit for new Travis CI run
* Refactoring class methods to instance methods
* Cleanup unused classed
* Removed Eddystone_weatherurl that had nothing to do with this component
* Cleanup class methods
* Cleanup requirements
* Removed broad excepts
Removed storage of LaMetric devices
* Removed unused import
* Use user-set device names for Linksys Smart Wi-Fi routers (3)
* Newline at end of linksys_smart.py
* Remove spaces in last line of linksys_smart.py
* Update linksys_smart.py
* make port mapping optional
* dependencies + improvements
* Added bytes and packets sensors from IGD
* flake8 check
* new sensor with upnp counters
* checks
* whitespaces in blank line
* requirements update
* added sensor.upnp to .coveragerc
* downgrade miniupnpc
Latest version of miniupnpc is 2.0, but pypi only has 1.9
Fortunately it is enough
* revert to non async
miniupnpc will do network calls, so this component can’t be moved to
coroutine
* hof hof
forgot to remove import ot asyncio
* UPnP mapping overlap
Addressing: https://community.home-assistant.io/t/upnp-new-module/20839
* removed whitespaces
Some devices don't seem to return the information properly when asked for
multiple attributes in one read. This separates out the reads if it didn't
work as expected the first time.
Because this data is cached in bellows, I don't expect any extra reads in
the "happy" case.
* Added support for TP-Link EAP 225
* code style changes
* more code style changes
* more understandable variable name
* Added support for TP-Link EAP 225
* code style changes
* more code style changes
* more understandable variable name
* Fix pylint issue (#8325)
* Added support for TP-Link EAP 225
* code style changes
* more code style changes
* more understandable variable name
* Added support for TP-Link EAP 225
* code style changes
* Update snips.py
* Get the list of wireless interfaces from nvram so tri-band routers
work
* ARP checks don't work reliably for ap mode so remove it, associated
list seems pretty solid
* Match on 'mac' instead of 'ip' since we can't use it for ap mode
* The `client_info_tmp` nvram reference, Asus removed it some time ago
* Update AsusWrtResult
* Fixed a bug where changing fan speed was not possible
* Bump pymodbus version to 1.3.1 to fix issue #8285
* Changed all modbus components so that they use CONF_SLAVE from const.py
* Fix checking result from a modbus transaction
* Add missing decorator
* Added modbus write coil service and added descriptions
* Removed a hiding debug print
* Add address-specific KNX listeners that fire events on the HASS bus
* Added docstring
1-byte messages will be converted from a list to the value
* Formating
* Try catch around database updates in recorder. Resolves 6919
* Fixing failed test for line length
* Catch only OperationalError and retry connections before giving up
* Including alchemy exceptions in single function
This applies what was the intended fix in #8336.
moves the fallback for setting client_id to the case when no mqtt config was provided at all. This should reflect the most common use case that fails.
This commit is a workaround and should be reverted when hbmqtt is fixed to allow empty client_id again.
* Initial commit - new CityBikes platform
* Several syntax fixes.
* Added imperial unit support.
* Added station list lenght validation.
* Style fixes.
* Updated requirements.
* Updated .coveragerc.
* Fixed style problems according to pylint output.
* Updated SCAN_INTERVAL value.
* Fixed station names.
Removed unnecessary calls to `slugify`.
Changed the base name to reflect the name of the bike sharing
network, instead of the more generic `citybikes`.
* Small style fix.
* Use async version of python-citybikes
* Made platform setup async.
* Made some more things async.
* Switched to constants.
* WIP: different approach to async.
* Removed python-citybikes depnedency to fix async issues.
* Removed unnecessary hidden property.
* Style fixes.
* Retry network detection.
* Style fixes, and base name usage.
* Fixes according to comments.
* Use cv.latitude instead of coercing to float.
* Updated requirements.
* Several fixes and improvements.
* Started using PlatformNotReady exception.
* Cached the networks list result to avoid unnecessary API requests.
* Switched the asyncio.timeout to use a constant.
* Refactored CityBikes API requests into a separate function
* Fixed linting errors.
* Removed unnecessary requirement.
* Lift Apple TV to pyatv 0.3.2
Update code to use basic new features.
* Support button presses in Apple TV
* Support device authentication
* Convert Apple TV to a component
A media_player platform and a remote platform will be loaded for each
manually configured or discovered device.
* Move device auth to apple_tv component
* Update requirements and coverage config
* Add scan support to apple_tv
* Remove the need to login on the UPC Connect component
* Remove unnecessary imports
* Update the unit tests for the UPC Connect component
* Fix the "302" error with the UPC Connect component
* Fix a flake8 error
* Update the unit tests for the UPC Connect component
The upstream Avion and Decora code has changed to punt retry logic out to
consumers, so update to match. As a bonus, Avion also gains support for
pulling switch configuration off the web rather than requiring manual
configuration.
* Fixed a bug where changing fan speed was not possible
* Bump pymodbus version to 1.3.1 to fix issue #8285
* Changed all modbus components so that they use CONF_SLAVE from const.py
* Add tube_state
Add tube_state sensor
* Final cleanup
* Make corrections
Correct PLATFORM_SCHEMA
* Fix space
* Make test pass
* Correct format of test
Test still failing, don’t understand why
* correct description
* Make test pass
Preferred method below returns None
state = self.hass.states.get('sensor.london_overground')
* Format for hound
* indent
* Make requested changes to test, not working
Test fails with:
AssertionError: assert 0 > 0
where 0 = len([])
Surely I need tube_state.setup_platform ?
* Fixed test
Config was wrong
* Change component name to london_tube
* Update name to london_underground
Make consistent
* cleanup
1. The has_attributes was comparing names to addresses
2. Some errors outside of an except block were using
_LOGGER.except. This will cause an exception itself because there is no
trance context available to the logger
3. Added alias names for the address and state addresses so that they
can be accessed with the same
4. Added return values for the set_int_value and set_percentage methods
to allow error checking similar to the set_value method
5. Added the name of the configured object to the log messages to make
them more meaningful (otherwise multiple similar log messages are
received without any hint as to the target device)
1. The has_attributes was comparing names to addresses
2. Some errors outside of an except block were using
_LOGGER.except. This will cause an exception itself because there is no
trance context available to the logger
3. Added alias names for the address and state addresses so that they
can be accessed with the same
4. Added return values for the set_int_value and set_percentage methods
to allow error checking similar to the set_value method
5. Added the name of the configured object to the log messages to make
them more meaningful (otherwise multiple similar log messages are
received without any hint as to the target device)
* Added camera service calls to arm/disarm the cameras. Entity id is optional so that with a single call we can arm all the cameras or specify a particular entity id to arm if applicable and possible in that camera type.
* Added camera service calls to arm/disarm the cameras. Entity id is optional so that with a single call we can arm all the cameras or specify a particular entity id to arm if applicable and possible in that camera type.
* Added camera service calls to arm/disarm the cameras. Entity id is optional so that with a single call we can arm all the cameras or specify a particular entity id to arm if applicable and possible in that camera type.
* Fixed the spaces and indentation related issues that houndci found
* Fixed the spaces and indentation related issues that houndci found
* Missed the const file which has the macros defined.
* Fixed the CI build error
* Fixed the CI build error because of unused variable in exception case
* Updating the arlo code based on comment from @balloob. Changed the arm and disarm to enable_motion_detection and disable_motion_detection respectively. Similarly fixed the AttributeError handling. Added dummy code to the demo camera also. Moved out the definitions in const.py into the camera __init__ file
* Fixed the comments posted by houndci-bot
* Fixed the comments posted by houndci-bot
* Fixed the comments posted by houndci-bot
* Fixed the comments posted by travis-ci integration bot
* Fixed the comments posted by travis-ci integration bot
* Fixed the comments posted by travis-ci integration bot for demo.py: expected 2 lines, found 1
* Updated code in camera __init__.py to use the get function instead of directly calling the member in the structure.
* Updated code in camera __init__.py
* Posting the updated code for PR based on @balloob's suggestions/recommendations
* Removed the arlo reference from demo code. Copy-paste error
* Removed the unused import found by hound bot
* Expected 2 lines before function, but found only 1.
* Based on @balloob's comments, moved these constants to the camera/arlo.py
* Added test_demo.py to test the motion enabled and motion disabled in camera component
* Fixing issues found by houndci-bot
* Fixing issues found by houndci-bot
* Fixing the code as per @balloob's suggestions
* Fixing the code as per @balloob's suggestions
* Fixing the test_demo failure. Tried to rewrite a base function to enable the motion in __init__.py and missed to add it to as a job.
* Fixing the hound bot comment
* Update arlo.py
* Update arlo.py
* Adding done_message to alert
Adding an optional entry to the config that will send a notification when an
alarm goes from on to off.
* Update test_alert.py
* Update test_alert.py
* Revert "Version bump to 0.49.0.dev0 (#8266)"
This reverts commit 8e4394f173.
* Revert "Adding done_message to alert (#8116)"
This reverts commit 5e56bc7464.
* Revert "Camera services arm disarm including Netgear Arlo (#7961)"
This reverts commit ed20f7e359.
* Revert "Make Android app shortcut use 'Home Assistant' as name instead of just 'Assistant'. (#8261)"
This reverts commit 0bcb7839fb.
* Revert "Version bump to 0.49.0.dev0 (#8266)"
This reverts commit 8e4394f173.
* Revert "Adding done_message to alert (#8116)"
This reverts commit 5e56bc7464.
* Revert "Camera services arm disarm including Netgear Arlo (#7961)"
This reverts commit ed20f7e359.
* Revert "Make Android app shortcut use 'Home Assistant' as name instead of just 'Assistant'. (#8261)"
This reverts commit 0bcb7839fb.
* Adding done_message to alert
Adding an optional entry to the config that will send a notification when an
alarm goes from on to off.
* Update test_alert.py
* Update test_alert.py
* Added camera service calls to arm/disarm the cameras. Entity id is optional so that with a single call we can arm all the cameras or specify a particular entity id to arm if applicable and possible in that camera type.
* Added camera service calls to arm/disarm the cameras. Entity id is optional so that with a single call we can arm all the cameras or specify a particular entity id to arm if applicable and possible in that camera type.
* Added camera service calls to arm/disarm the cameras. Entity id is optional so that with a single call we can arm all the cameras or specify a particular entity id to arm if applicable and possible in that camera type.
* Fixed the spaces and indentation related issues that houndci found
* Fixed the spaces and indentation related issues that houndci found
* Missed the const file which has the macros defined.
* Fixed the CI build error
* Fixed the CI build error because of unused variable in exception case
* Updating the arlo code based on comment from @balloob. Changed the arm and disarm to enable_motion_detection and disable_motion_detection respectively. Similarly fixed the AttributeError handling. Added dummy code to the demo camera also. Moved out the definitions in const.py into the camera __init__ file
* Fixed the comments posted by houndci-bot
* Fixed the comments posted by houndci-bot
* Fixed the comments posted by houndci-bot
* Fixed the comments posted by travis-ci integration bot
* Fixed the comments posted by travis-ci integration bot
* Fixed the comments posted by travis-ci integration bot for demo.py: expected 2 lines, found 1
* Updated code in camera __init__.py to use the get function instead of directly calling the member in the structure.
* Updated code in camera __init__.py
* Posting the updated code for PR based on @balloob's suggestions/recommendations
* Removed the arlo reference from demo code. Copy-paste error
* Removed the unused import found by hound bot
* Expected 2 lines before function, but found only 1.
* Based on @balloob's comments, moved these constants to the camera/arlo.py
* Added test_demo.py to test the motion enabled and motion disabled in camera component
* Fixing issues found by houndci-bot
* Fixing issues found by houndci-bot
* Fixing the code as per @balloob's suggestions
* Fixing the code as per @balloob's suggestions
* Fixing the test_demo failure. Tried to rewrite a base function to enable the motion in __init__.py and missed to add it to as a job.
* Fixing the hound bot comment
* Update arlo.py
* Update arlo.py
* Implement templates for covers
* Fix a few remaining pylint warnings
* Fix hound line-length warnings
* Fix one more hound line-length warning
* Fix quadruple-quotes an line length code-quality issues
* Irrelevant change to retrigger travis due to timeout
* Use volutuous Exclusive to check for mutex condition
* Fix incorrect state check