* Adding support for Lutron Radio RA2 shades as cover components.
* Adding initial version of the Lutron shades component.
* Fixed line-length violation detected by Hound.
* Added snips.say and snips.say_action services
* Added snips.say and snips.say_action services
* Merged services.yaml changes I missed
* added tests for new service configs
* Woof
* Woof Woof
* Changed attribute names to follow hass standards.
* updated test_snips with new attribute names
* Added support for enable/disable motion detection
* Changed name of variable for exception, lint error
* Moved motion_detection_enabled property to the other properties
* Fix error when name is non-latin script
When the name is non-latin script (e.g. Japanese), slugify returns empty string and causes failure in a later stage. This commit fixes the issue by using default name.
* Add test
* Make the order shown in the history component match the ordering given in the configuration of included entities (if any)
* return the sorted result
* optimize sorting. since entities only appear once, we can break from a search on first find, and no copy of the list is needed
* Changed device type of media player and cover to switch
Covers and media players should not be of device type 'light'. Example: If user requests all lights to switch to off, covers are closed and media players are affected too.
* Fix test
* Make the rpi_rf component thread-safe
The previous implementation suffered from race conditions when two rpi_rf switches are triggered at the same time. This implementation uses an RLock to give one thread at a time exclusive access to the rfdevice object.
* cleanup
* fix lint
* Deprecate explicit entity_id in template platforms
* Use config validator for deprecation
* Fix copy/paste typos
* Also print the config value
* Add test for config validator
* Assert the module name that logged the message
If the `google_assistant` key exists in the config but has no
`entity_config` key under it you'll get an error.
```
File "/Users/pkates/src/home-assistant/homeassistant/components/google_assistant/http.py", line 51, in is_exposed
entity_config.get(entity.entity_id, {}).get(CONF_EXPOSE)
AttributeError: 'NoneType' object has no attribute 'get'
```
* Add 2 media_player services and 1 custom service to Squeezebox platform
* Fix pylint error
* Remove apostrophe in example
* Split method into command and parameters
* Fix Lint error
* Switch the ZoneMinder event sensor over to use the consoleEvents API, and add monitored_conditions for 'hour', 'day', 'week', 'month' and 'all'. 'all' is enabled by default to provide backward compatibility with the old behaviour.
* - Switch to new string formatting
- Remove redundant validator
* De-lint
* trying to rework device discovery. now the main component will do the getlinked and pass it to the sub-components. no longer any config needed other than what is needed to connect to the hub. device names are no longer stored. core team told us to stop using configurator to ask for names. there should be a way to set names in hass...possibly this https://home-assistant.io/docs/configuration/customizing-devices/
* fix device types
* make device names just be the isnteon device id
* revert some config changes
* Update insteon_local.py
* Update insteon_local.py
* Update insteon_local.py
* Update insteon_local.py
* Update insteon_local.py
* Update insteon_local.py
* Update insteon_local.py
* update insteon client
* linting fixes
* Error Clean up
* Update to make requested changes
* more changes
* Finish requested changes to components
* Fixing Rebase Conflicts
* fix device types
* make device names just be the isnteon device id
* revert some config changes
* Update insteon_local.py
* Update insteon_local.py
* Update insteon_local.py
* Update insteon_local.py
* Update insteon_local.py
* Update insteon_local.py
* Update insteon_local.py
* update insteon client
* linting fixes
* Error Clean up
* Update to make requested changes
* more changes
* Finish requested changes to components
* Update Insteon_Local for performance improvements
* Fix errors from get_linked
* Fix typo
* Requested changes
* Fix spacing
* Clean up
* Requested Changes
* Add options feature to Baidu TTS.
Add options feature: supported_options() and default_options() added, get_tts_audio updated to accommodate options.
* Add options feature to Baidu TTS.
Add options feature: supported_options() and default_options() added, get_tts_audio updated to accommodate options.
* Fix style
* Fix style
Change the order of content of lists and dictionaries.
* Fix style
Changed order of imports, and fixed grammar errors.
For example all metrics with unit % match humidity.
This generate correct metrics like this
# HELP nut_ups_battery_charge sensor.nut_ups_battery_charge
# TYPE nut_ups_battery_charge gauge
nut_ups_battery_charge{entity="sensor.nut_ups_battery_charge",friendly_name="NUT UPS Battery Charge"} 98.0
nut_ups_battery_charge{entity="sensor.nut_ups_battery_charge_2",friendly_name="NUT UPS Battery Charge"} 97.0
* Extended sensor alpha_vantage
* Improved error handling if symbol is not found. Now we add the symbols that were found,
* Added option to give names and currencies to symbols.
* Added support to read foreign exchange information.
* Icons are selected based on the currency (where MDI has a matching icon)
* added missing line at the end of the file...
* renamed variable as required by pylint
* Fix typos, ordering, and style
* Connection to mochad occasionally stalls on RPi and CM19A. Reconnect one switch send command.
* Formatting and exception hanling fixes
* Moved import inside the method. Logging outside the try-catch.
* Tailing whitespaces.
* MockDependency on pymochad in unit tests to resolve exceptions
* patch pymochad MochadException in unit tests to resolve exceptions
* patch pymochad MochadException in unit tests to resolve exceptions
* cleaned unused import
* lint issue fixed
* pylint issue fixed
* New features for Owntracks device_tracker
- Supporting a mapping of region names in OT to zones in HA, allowing
separate namespaces in both applications. This is especially helpful
if using one OT instance to update geofences for multiple homes.
- Creating a setting to ignore all location updates, allowing users to
rely completely on enter and leave events. I have personally always
used OT integrations with home automation this way and find it the
most reliable.
- Allowing the OT topic to be overridden in configuration
* Fixing configuration of MQTT topic, related tests
* Tests for Owntracks events_only feature
* Tests for customizing mqtt topic, region mapping
* Fixing _parse and http for owntracks custom topic
* Making tests more thorough and cleaning up lint
* Lazy loading of service descriptions
* Fix tests
* Load YAML in executor
* Return a copy of available services to allow mutations
* Remove lint
* Add zha/services.yaml
* Only cache descriptions for known services
* Remove lint
* Remove description loading during service registration
* Remove description parameter from async_register
* Test async_get_all_descriptions
* Remove lint
* Fix typos from multi-edit
* Remove unused arguments
* Remove unused import os
* Remove unused import os, part 2
* Remove unneeded coroutine decorator
* Only use executor for loading files
* Cleanups suggested in review
* Increase test coverage
* Fix races in existing tests
* Issue #11432: Do not stop initializing KNX when tunelling device cant be reached
* Issue #11432: Mark devices as unavailable if gateway cant be connected
Add the amount of remaining time before a timer is finished in its state attributes, so that it is received when fetching a timer state.
In my particular case, it allows me to correctly implement a UI for a timer when it is paused and when the UI didn't received the pause state change (which happens when the UI is started after the pause). In this case, it is impossible to show the remaining amount of time before the timer ends.
* Fix time functions would throw errors in python scripts
* Added unit test for time.strptime, change variable name to satisfy lint
* Added docstring for time attribute wrapper method to satisfy lint
* Fixed line too long lint problem
* Add new iGlo component
* Missing comma
Add extra blank lines
* Dont change state in turn_on
Remove unused variables
Update before add
* Fixing some lint issues
* Add toucline platform
* Fix bugs suggested by houndci-bot
* Fix bugs suggested by houndci-bot
* Fix style based on comments and lint
* Remove target temperature
* Fix unexpected EOF
* Fix unexpected EOF
* Fix wrongfully named numberOfDevices variable
* Add target temperature
* Update requirements_all.txt
* Change after review
* Add supported features
* Remove update in constructor
* Set member variables to none in constructor
* Minor changes
* Don't duplicate html5 registrations
If a registration is posted and another registration with the same
endpoint URL exists, update that one instead. That way, we preserve
the device name that has been configured. The previous behavior used to
append 'unnamed device' registrations over and over, leading to
multiple copies of the same registration. The endpoint URL is unique per
service worker so it is safe to update matching registrations.
* Refactor html5 registration view to not write json in the event loop
* Reconnect to alarmdecoder on disconnect
* Use track_point_in_time instead of call_later
* use alarmdecoder 1.13.2 which has a more robust reconnection fix
* Updated generic thermostat to respect operation_mode and added away mode
* Updated tests to include away mode and corrected init problem for sensor state
Added more tests to improve coverage and corrected again lint errors
Fixed new test by moving to correct package
Fixed bug not restoring away mode on restart
* Added support for idle on interface through state
* Added back initial_operation_mode and modified away_temp to be only one for now
* Fixed houndci-bot errors
* Added back check for None on restore temperature
* Fixed failing tests as well
* Removed unused definitions from tests
* Added use case for no initial temperature and no previously saved temperature
* Added Daikin climate component
* Fixed tox & hound
* Place up the REQUIREMENTS var
* Update .coveragerc
* Removed unused customization
* Prevent setting invalid operation state
* Fixed hound
* Small refactor according to code review
* Fixed latest code review comments
* Used host instead of ip_address
* No real change
* No real change
* Fixed lint errors
* More pylint fixes
* Shush Hound
* Applied suggested changes for temperature & humidity settings
* Fixed hound
* Fixed upper case texts
* Fixed hound
* Fixed hound
* Fixed hound
* Removed humidity since even the device has the feature it cant be set from API
* Code review requested changes
* Fixed hound
* Fixed hound
* Trigger update after adding device
* Added Daikin sensors
* Fixed hound
* Fixed hound
* Fixed travis
* Fixed hound
* Fixed hound
* Fixed travis
* Fixed coverage decrease issue
* Do less API calls and fixed Travis failures
* Distributed code from platform to climate and sensor componenets
* Rename sensor state to device_attribute
* Fixed hound
* Updated requirements
* Simplified code
* Implemented requested changes
* Forgot one change
* Don't allow customizing temperature unit and take it from hass (FOR NOW)
* Additional code review changes applied
* Condensed import even more
* Simplify condition check
* Reordered imports
* Disabled autodiscovery FOR NOW :(
* Give more suggestive names to sensors
* fix: hmip-etrv-2 now working with homeassistant (see also pull request at pyhomematic)
* fix linting issue and typo
* address comment @pvizeli
* Only use cached data in current operation mode
* fix linting issue
* Updated plexapi to 3.0.5
* Removed removed server obj that was being used for the media URL generation as .url() is available in self._session
seasons() no longer exists -> renamed to season()
season() returns obj not list so corrected
season.index returns int, cast to str to zerofill
* Fixed Linting
* Account for User-Agent being non-existent, causing a TypeError
* Actually fix case of no user-agent with last resort
* Return es5 as last resort
* Update __init__.py
* Update __init__.py
* 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
Reverts energy and power unit conversions added in #10979 as they break
early devices.
A proper fix should be implemented in the pyhs100 library which should
return common units across all devices/firmwares.
* Remember the Milk - updating and completing tasks
Added new feature so that tasks can be updated and completed.
For this feature a task id must be set when creating the task.
* fixed hould complaints
* fixed review comments by @MartinHjelmare
* removed unnecessary check as proposed by @MartinHjelmare
* Support for EcoNet water heaters.
* Fixed requested changes.
* Added logging when temp or operation mode are None
* More fixes from PR review.
* Updated pyeconet version to fix natural gas water heater error. Last PR review fix.
* Use different colour channel intensities in tests
Uses a different value for each colour channel in MQTT light tests to
properly differentiate between colour channels.
* Correct ordering of RGB channels in MQTT light
* Correct units used in TP-Link energy monioring
- Energy is measured in kWh for swtches
- Power is reported in mW for bulbs
- Energy is reported in Wh for bulbs
* TP-Ling energy: store units in attribute names
Stores the unit in the attrbute names for TP-Link devices that support
energy monitoring.
* Allow disabling the DoorBird camera live view
* Support for push notifications from DoorBird devices
* use DoorBirdPy 0.1.1 instead of 0.1.0
* Fix lint errors in DoorBird binary sensor
* Change DoorBird push notifications from binary sensor to event
* Remove DoorBird camera options
* use DoorBirdPy 0.1.2 to fix history image urls
* clean up doorbird event code and remove unused doorbird camera imports
* use async for doorbird doorbell events
* Minor changes
* Update file header
* Fix my mess
* Fix docstring
* add required files
* add sochain sensor
* add missing schema
* end first sentence with a period to make travis happy
* upgrade to python-sochain-api 0.0.2 and use asyncio
* add missing _LOGGER and fix long line
* move object setup to async_setup_platform
* rename chainSo variable to chainso
* Removing need for separate Egardiaserver setup
* Fixing linting errors
* Updating egardia component based on review
* Updating egardia component based on review
* Updating egardia component based on review
* Removed return False twice based on review
Leak sensors were using the "wet" node as a negative node, which prevented them from ever gettng a Dry status unless the user pressed the button on the hardware after every Hass reboot.
This change ignores the Wet node, as it is just always the exact inverse of the Dry node. We don't need to watch both.
* Huge ISY994 platform cleanup, fixes support for 5.0.10 firmware
# * No more globals - store on hass.data
# * Parent ISY994 component handles categorizing nodes in to Hass components, rather than each individual domain filtering all nodes themselves
# * Remove hidden string, replace with ignore string. Hidden should be done via the customize block; ignore fully prevents the node from getting a Hass entity
# * Removed a few unused methods in the ISYDevice class
# * Cleaned up the hostname parsing
# * Removed broken logic in the fan Program component. It was setting properties that have no setters
# * Added the missing SUPPORTED_FEATURES to the fan component to indicate that it can set speed
# * Added better error handling and a log warning when an ISY994 program entity fails to initialize
# * Cleaned up a few instances of unecessarily complicated logic paths, and other cases of unnecessary logic that is already handled by base classes
* Use `super()` instead of explicit base class calls
* Move `hass` argument to first position
* Use str.format instead of string addition
* Move program structure building and validation to component
Removes the need for a bunch of duplicate exception handling in each individual platform
* Fix climate nodes, fix climate names, add config to disable climate
Sensor platform was crashing when the ISY reported climate nodes. Logic has been fixed. Also added a config option to prevent climate sensors from getting imported from the ISY. Also replace the underscore from climate node names with spaces so they default to friendly names.
* Space missing in error message
* Fix string comparison to use `==`
* Explicitly check for attributes rather than catch AttributeError
Also removes two stray debug lines
* Remove null checks on hass.data, as they are always null at this point
* Enable more alarm decoder attributes, including chime status and ready status
* Expose chime service in the alarm decoder component
* Fix line length linting issue
* Fix spacing lint issue
* Update PR based on reviewer requests
* Update based on linting catches
* Fix descriptions include from async to sync
* Store raw state of RF sensors from alarmdecoder
* Fix resync. Fix issue with RFID not being truly optional
* Breakdown RF attributes per bit
* Preserve import style
* alexa: Add handling for covers
Covers don't support either cover.turn_on or homeassistant.turn_on so
use cover.[open|close]_cover.
* alexa: Add tests for covers
* Cleaned up '_clear_media()'
* Moved media Type to new method
* renamed "clear_media()' to ' clear_media_details()'
reset 'app_name' (Library Name) in clear_media_details
moved thumbs to '_set_media_image()'
* Moved playback info into setmedia type as it was just used for the next anyway
* Moved library name & image download to only happen if session and player active as else no point anyway
* Fixed Linting issue
* Some tweaks to clean up unintended complexity
* Removed redundant declarations
* Fixed whitespace
* Revert "Fixed whitespace"
This reverts commit 0985445c47.
* Revert "Removed redundant declarations"
This reverts commit 6f9d5a85b0.
* Improve support for multiple Hue bridges with lights that have the same id.
The old code pre-refactoring kept a per-bridge list of lights in a closure; my refactoring moved that to hass.data, which is convenient but caused them to conflict with each other.
Fixes#11183
* Update test_hue.py
* Call update on Sesame devices to cache initial state
* Switch to using async_add_devices
* Fix line length
* Fix Lint errors
* Fix more Lint errors
* Cache pysesame properties
* Updates from CR feedback
* added functionality to save/restore snapshots to monoprice platform
* renamed monoprice_snapshot, monoprice_restore to snapshot, restore
This is to simplify refactoring of snapshot/restore functionality for monoprice, snapcast and sonos in the future
* Revert "Adding MotionIP to BinarySensors for HMIP-SMI (#11268)"
This reverts commit c94cc34a8f.
* Revert "Bugfix: 10509 - http is hard coded in plex sensor (#11072)"
This reverts commit 901d4b5489.
* Revert "Fix handling zero values for state_on/state_off (#11264)"
This reverts commit 2e4e3a42cc.
* Revert "Fix inverted sensors on the concord232 binary sensor component (#11261)"
This reverts commit b866687cd7.
* Revert "Proper Steam game names and small fixes (#11182)"
This reverts commit 7faa94046c.
* Revert "Bugfix homematic available modus (#11256)"
This reverts commit 1d579587c1.
* Revert "Fix detection of if a negative node is in use (#11255)"
This reverts commit b28bfad496.
* Revert "added myself to become code owner for miflora and plant (#11251)"
This reverts commit e0682044f0.
* Revert "Add workaround for running tox on Windows platforms (#11188)"
This reverts commit 81f1a65fae.
* Revert "Upgrade to new miflora version 0.2.0 (#11250)"
This reverts commit 8efc4b5ba9.
* Revert "homematic: add username and password to interface config schema (#11214)"
This reverts commit b4e2537de3.
* Revert "Backup configuration files before overwriting (#11216)"
This reverts commit 90e25a6dfb.
* Adding MotionIP to BinarySensors for HMIP-SMI
My HmIP-SMI (Homematic IP Motion Sensor) only shows "ILLUMINATION" and no MOTION, because the binary values are not recognized. The "old" homematic-motion detectors are working well showing motion, too.
I found out that "MotionIP" was missing at the binary_sensors - after adding "Motion" and "Motion Detection Activated" are shown.
* Removed trailing blanks
removed trailing blanks from my previous change
* Use constant for offline state
* Use constant for no game name
* Rename trade and play constant their proper names
Trade and Play are not the correct names for the states. For instance
Play might be seens as the user is actually is playing, which is not
correct as there is no such state is returned from the Steam API.
Just having "trade" does not say much about what is happening and
might be misintepreted that the user is currently trading, which is not
correct either.
We instead use the names from the underlying library for naming the
states [1]
[1] 2e518ad84f/steam/user.py (L109)
* Get the proper game name if no extra info is given from the api
The third `current_game` parameter that was used before hold
extra information about the game that is being played. This might
contain the game name, it might also be empty. The correct way to
get the game name is to fetch it from the API depending on the
game id that might be returned in the `current_game` attribute if
the user is playing a game.
To not break existing implementations we keep the functionality
to first go with the extra information and only then fetch the proper
game name.
* Refactor getting game name to its own function
This cleans up the code and removed "ugly" else statements
from the sensor and makes the game fetching easier to read.
* Let state constant values be lower snake case
* Return None instead of 'None' when no current game exists
* Initialize steam app list only once to benefit form caching
* Return None as state attributes if no current game is present
* Fix detection of if a negative node is in use
Fix a problem where every negative node gets detected as in-use. Code was not checking the correct property.
* Allow protected access
* Extend Threshold binary sensor to support ranges
- Adds support for ranges
- Threshold type (lower, upper, range) is defined by supplied
thresholds (lower, upper)
- Adds verbose status/position relative to threshold as attribute
(position)
* Minor changes (ordering, names, etc.)
* Update name
* Update name
* Fix statistics sensor mean and median when only one sample is available.
With only one data point stddev and variance throw an exception.
This would clear the (valid) mean and median calculations.
Separate the try..catch blocks for one-or-more and two-or-more stats so
that this doesn't happen.
Test this with a new sampling_size_1 test.
* test_statistics trivial whitespace fix
Sonos Playbar and Playbase devices support Night Sound and Speech Enhancement
effects when playing from sources such as a TV. Adds a new service "sonos_set_option"
whichs accepts boolean options to control these audio features.
Sonos Playbar and Playbase devices support Night Sound and Speech Enhancement
effects when playing from sources such as a TV. Adds a new service "sonos_set_option"
whichs accepts boolean options to control these audio features.
* Fix X10 commands for mochad light turn on
This commit attempts to address issues that a lot of people are having
with the x10 light component. Originally this was written to use the
xdim (extended dim) X10 command. However, not every X10 dimmer device
supports the xdim command. Additionally, it turns out the number of
dim/brighness levels the X10 device supports is device specific and
there is no way to detect this (given the mostly 1 way nature of X10)
To address these issues, this commit removes the usage of xdim and
instead relies on using the 'on' command and the 'dim' command. This
should work on all x10 light devices. In an attempt to address the
different dim/brightness levels supported by different devices this
commit also adds a new optional config value, 'brightness_levels', to
specify if it's either 32, 64, or 256. By default 32 levels are used
as this is the normal case and what is documented by mochad.
Fixes#8943
* make code more readable
* fix style
* fix lint
* fix tests
* Fix X10 commands for mochad light turn on
This commit attempts to address issues that a lot of people are having
with the x10 light component. Originally this was written to use the
xdim (extended dim) X10 command. However, not every X10 dimmer device
supports the xdim command. Additionally, it turns out the number of
dim/brighness levels the X10 device supports is device specific and
there is no way to detect this (given the mostly 1 way nature of X10)
To address these issues, this commit removes the usage of xdim and
instead relies on using the 'on' command and the 'dim' command. This
should work on all x10 light devices. In an attempt to address the
different dim/brightness levels supported by different devices this
commit also adds a new optional config value, 'brightness_levels', to
specify if it's either 32, 64, or 256. By default 32 levels are used
as this is the normal case and what is documented by mochad.
Fixes#8943
* make code more readable
* fix style
* fix lint
* fix tests
* Fire events for ISY994 control events
This allows hass to react directly to Insteon button presses (on switches and remotes), including presses, double-presses, and long holds
* Move change event subscription to after entity is added to hass
The event handler method requires `self.hass` to exist, which doesn't have a value until the async_added_to_hass method is called. Should eliminate a race condition.
* Overhaul binary sensors in ISY994 to be functional "out of the box"
We now smash all of the subnodes from the ISY994 in to one Hass binary_sensor, and automatically support both paradigms of state reporting that Insteon sensors can do. Sometimes a single node's state represents the sensor's state, other times two nodes are used and only "ON" events are sent from each. The logic between the two forunately do not conflict so we can support both without knowing which mode the device is in.
This also allows us to handle the heartbeat functionality that certain sensors have - we simply store the timestamp of the heartbeat as an attribute on the sensor device. It defaults to Unknown on bootup if and only if the device supports heartbeats, due to the presence of subnode 4.
* Parse the binary sensor device class from the ISY's device "type"
Now we automatically know which sensors are moisture, motion, and openings! (We also reverse the moisture sensor state, because Insteon reports ON for dry on the primary node.)
* Code review tweaks
The one material change here is that the event subscribers were moved to the `async_added_to_hass` method, as the handlers depend on things that only exist after the entity has been added.
* Handle cases where a sensor's state is unknown
When the ISY first boots up, if a battery-powered sensor has not reported in yet (due to heartbeat or a change in state), the state is unknown until it does.
* Clean up from code review
Fix coroutine await, remove unnecessary exception check, and return None when state is unknown
* Unknown value from PyISY is now -inf rather than -1
* Move heartbeat handling to a separate sensor
Now all heartbeat-compatible sensors will have a separate `binary_sensor` device that represents the battery state (on = dead)
* Add support for Unknown state, which is being added in next PyISY
PyISY will report unknown states as the number "-inf". This is implemented in the base ISY994 component, but subcomponents that override the `state` method needed some extra logic to handle it as well.
* Change a couple try blocks to explicit None checks
* Bump PyISY to 1.1.0, now that it has been published!
* Remove -inf checking from base component
The implementation of the -inf checking was improved in another branch which has been merged in to this branch already.
* Restrict negative-node and heartbeat support to known compatible types
Not all Insteon sensors use the same subnode IDs for the same things, so we need to use different logic depending on device type. Negative node and heartbeat support is now only used for leak sensors and open/close sensors.
* Use new style string formatting
* Add binary sensor detection for pre-5.x firmware
Meant to do this originally; writing documentation revealed that this requirement was missed!
* Allow using more than one keyboard remote
This sets up one thread per keyboard remote, listening for events.
* Remove enclosing block in keyboard_remote
* Remove unnecessary semantic check for keyboard_remote
The current code relies on the assumption that the first invocation will never specify no_throttle=True.
However that puts us in a pickle when writing unit tests: if we had a fictitious:
def setup_platform():
update()
@Throttle(MIN_TIME_BETWEEN_SCANS)
def update():
pass
Then given multiple tests, the second and some of subsequent tests would be throttled (depending on timing).
But we also can't change that code to call `update(no_throttle=True)' because that's not currently accepted.
This diff shouldn't change the visibile behavior of any component, but allows this extra flexibility.
* Add media progress information
* Remove unnecessary comments
* Remove datetime import
* Remove pysonyavr dependency
* Fix doc syntax (D205)
* Lint fix: no-else-return
* Don't attempt to set media progress info if program is None
* Fix Python 3.4 compatibility
* Explicitely depend on pyteleloisirs
* Only update remaining play time when it changed
* Fix floot state table
* Introduce a new Hue component that knows how to talk to a Hue bridge, but doesn't actually set up lights.
* Refactor the hue lights platform to use the HueBridge class from the hue component.
* Reimplement support for multiple bridges
* Auto discover bridges.
* Provide some migration support by showing a persistent notification.
* Address most feedback from code review.
* Call load_platform from inside HueBridge.setup passing the bridge id.
Not only this looks nicer, but it also nicely solves additional bridges being added after initial setup (e.g. pairing a second bridge should work now, I believe it required a restart before).
* Add a unit test for hue_activate_scene
* Address feedback from code review.
* After feedback from @andrey-git I was able to find a way to not import phue in tests, yay!
* Inject a mock phue in a couple of places
* Add support for Logitech UE Smart Radios.
* Removed full stops to please Hound's line limit.
* Updated with requested changes.
* Fix Pylint Flake8 problem.
* Updated with requested changes.
All mochad devices are sharing a single socket interface. When multiple
threads are issuing requests to the mochad daemon at the same time the
write read cycle might get crossed between the threads. This is normally
not an issue for 1-way X10 devices because as long as the request issued
successfully and data is read over the socket then we know as much as
mochad will tell us (since there is no ACK from the request for most
X10 devices). However, where it does matter is on the device __init__()
because we're relying on the mochad daemon's internal state to take an
educated guess at the device's state to intialize things with. When
there are multiple devices being initialized at the same time the wires
can get crossed between and the wrong device state may be read.
To address this potential issue this commit adds locking using a
semaphore around all pairs of send_cmd() and read_data() (which is what
pymochad.device.Device.get_status() does internally) calls to the mochad
controller to ensure we're only ever dealing with a single request at a
time.
Fixesmtreinish/pymochad#4
* Updated snips to listen on new mqtt topic and use rawValue if value not present in slot
* Too late at night
* Trying to make minor changes via web
* Update test_snips.py
* Update __init__.py
* Updated wrong branch cause I'm a monkey
* Add Canary component
* Made some change to how canary data is updated and stored
* Updated to use py-canary:0.1.2
* Addressed flake8 warnings
* Import canary API locally
* Import canary API locally again
* Addressed pylint errors
* Updated requirements_all.txt
* Fixed incorrect unit of measurement for air quality sensor
* Added tests for Canary component and sensors
* Updated canary component to handle exception better when initializing
* Fixed tests
* Fixed tests again
* Addressed review comments
* Fixed houndci error
* Addressed comment about camera force update
* Addressed comment regarding timeout when fetching camera image
* Updated to use py-canary==0.2.2
* Increased update frequency to 30 seconds
* Added support for Canary alarm control panel
* Address review comments
* Fixed houndci error
* Fixed lint errors
* Updated test to only test setup component / platform
* Fixed flake error
* Fixed failing test
* Uptake py-canary:0.2.3
* canary.alarm_control_panel DISARM is now mapped to canary PRIVACY mode
* Fixed failing tests
* Removed unnecessary methods
* Removed polling in canary camera component and update camera info when getting camera image
* Added more tests to cover Canary sensors
* Address review comments
* Addressed review comment in tests
* Fixed pylint errors
* Excluded canary alarm_control_panel and camera from coverage calculation
* initial commit of shuffle option for sonos
* added test
* Small adjustments to adhere to review requests
* Removed unnessesary setting of variable. Use shuffle state from soco instead
In a case where either (a) an incorrect source name is used, or (b) the
TV isn't currently queryable (e.g. it's off), we get tracebacks because
we assume the source that we are being asked to select exists in
self._source_list.
This makes the lookup code a little more rugged, and adds in a warning
message (in place of the current exception).
* Device tracker for meraki AP
* styles fix
* fix again
* again
* and again :)
* fix hide if away
* docs and optimization
* tests and fixes
* styles
* styles
* styles
* styles
* styles fix. Hope last
* clear track new
* changes
* fix accuracy error and requested changes
* remove meraki from .coveragerc
* tests and minor changes
* remove location
* Generic thermostat restore operation mode
* Test restore operation mode
* Fix trailing whitespace
* Fix line too long
* Fix test duplicate entity_id
* Fix test
* async_added_to_hass modify modify internal state
* Test inital_operation_mode
* More restore state tests
* Fix whitespace
* fix test_custom_setup_param
* Test "None" target temp
* add ads hub, light and switch
* add binary sensor prototype
* switch: use adsvar for connection
* fix some issues with binary sensor
* fix binary sensor
* fix all platforms
* use latest pyads
* fixed error with multiple binary sensors
* add sensor
* add ads sensor
* clean up after shutdown
* ads component with platforms switch, binary_sensor, light, sensor
add locking
poll sensors at startup
update state of ads switch and light
update ads requirements
remove update() from constructors on ads platforms
omit ads coverage
ads catch read error when polling
* add ads service
* add default settings for use_notify and poll_interval
* fix too long line
* Fix style issues
* no pydocstyle errors
* Send and receive native brightness data to ADS device to prevent issues with math.floor reducing brightness -1 at every switch
* Enable non dimmable lights
* remove setting of self._state in switch
* remove polling
* Revert "remove polling"
This reverts commit 7da420f823.
* add service schema, add links to documentation
* fix naming, cleanup
* re-remove polling
* use async_added_to_hass for setup of callbacks
* fix comment.
* add callbacks for changed values
* use async_add_job for creating device notifications
* set should_poll to False for all platforms
* change should_poll to property
* add service description to services.yaml
* add for brigthness not being None
* put ads component in package
* Remove whitespace
* omit ads package
* Export climate metrics to Prometheus.
This adds climate_state and temperature_c metrics for each climate
device.
* Add more climate states to state_as_number
* check for none
* fix error from no store being set
* typo
* Lint
* fix default as per notes. Lint fix and make closest store None not False
* update default
* Added min and Events sensor types to prometheus
* Updated prometheus client and fixed invalid swith state
* Added metric to count number of times an automation is triggered
* Removed assumption that may not apply to everybody
* Fixed tests
* Updated requirements_test_all
* Fixed unit tests
* Correction of Samsung Power OFF behaviour
Addition of a delay after powering OFF a Samsung TV, this avoid status
update from powering the TV back ON.
Deletion of update() return statement, return value not used.
* Rename self._end_of_power_off_command into self._end_of_power_off
* Removal of unused line break in Samsung TV component
* Add iAlarm support
* Minor fixes to iAlarm
* Rename ialarmpanel to ialarm and add a check for the host value
* corrections in the value validation of ialarm
* add a missing period on ialarm
* Added support for extracting JSON attributes from RESTful values
Setting the json_attributes configuration option to true on the
RESTful sensor will cause the result of the REST request to be parsed
as a JSON string and if successful the resulting dictionary will be
used for the attributes of the sensor.
* Added support for extracting JSON attributes from RESTful values
Setting the json_attributes configuration option to true on the
RESTful sensor will cause the result of the REST request to be parsed
as a JSON string and if successful the resulting dictionary will be
used for the attributes of the sensor.
* Added requirement that RESTful JSON results used as attributes must be
objects, not lists.
* Expanded test coverage to test REFTful JSON attributes with and
without a value template.
* Added support for extracting JSON attributes from RESTful values
Setting the json_attributes configuration option to true on the
RESTful sensor will cause the result of the REST request to be parsed
as a JSON string and if successful the resulting dictionary will be
used for the attributes of the sensor.
* Added requirement that RESTful JSON results used as attributes must be
objects, not lists.
* Expanded test coverage to test REFTful JSON attributes with and
without a value template.
* sensor.envirophat: add missing requirement (#7451)
Adding requirements that is not explicitly pulled in by the library
that manages the Enviro pHAT.
* PyPI Openzwave (#7415)
* Remove default zwave config path
PYOZW now has much more comprehensive default handling for the config
path (in src-lib/libopenzwave/libopenzwave.pyx:getConfig()). It looks in
the same place we were looking, plus _many_ more. It will certainly do a
much better job of finding the config files than we will (and will be
updated as the library is changed, so we don't end up chasing it). The
getConfig() method has been there for a while, but was subsntially
improved recently.
This change simply leaves the config_path as None if it is not
specified, which will trigger the default handling in PYOZW.
* Install python-openzwave from PyPI
As of version 0.4, python-openzwave supports installation from PyPI,
which means we can use our 'normal' dependency management tooling to
install it. Yay.
This uses the default 'embed' build (which goes and downloads
statically sources to avoid having to compile anything locally). Check
out the python-openzwave readme for more details.
* Add python-openzwave deps to .travis.yml
Python OpenZwave require the libudev headers to build. This adds the
libudev-dev package to Travis runs via the 'apt' addon for Travis.
Thanks to @MartinHjelmare for this fix.
* Update docker build for PyPI openzwave
Now that PYOZW can be install from PyPI, the docker image build process
can be simplified to remove the explicit compilation of PYOZW.
* Add datadog component (#7158)
* Add datadog component
* Improve test_invalid_config datadog test
* Use assert_setup_component for test setup
* Fix object type for default KNX port
#7429 describes a TypeError that is raised if the port is omitted in the config for the KNX component (integer is required (got type str)). This commit changes the default port from a string to an integer. I expect this will resolve that issue...
* Added support for extracting JSON attributes from RESTful values
Setting the json_attributes configuration option to true on the
RESTful sensor will cause the result of the REST request to be parsed
as a JSON string and if successful the resulting dictionary will be
used for the attributes of the sensor.
* Added requirement that RESTful JSON results used as attributes must be
objects, not lists.
* Expanded test coverage to test REFTful JSON attributes with and
without a value template.
* Added support for extracting JSON attributes from RESTful values
Setting the json_attributes configuration option to true on the
RESTful sensor will cause the result of the REST request to be parsed
as a JSON string and if successful the resulting dictionary will be
used for the attributes of the sensor.
* Added requirement that RESTful JSON results used as attributes must be
objects, not lists.
* Expanded test coverage to test REFTful JSON attributes with and
without a value template.
* Added support for extracting JSON attributes from RESTful values
Setting the json_attributes configuration option to true on the
RESTful sensor will cause the result of the REST request to be parsed
as a JSON string and if successful the resulting dictionary will be
used for the attributes of the sensor.
* Added requirement that RESTful JSON results used as attributes must be
objects, not lists.
* Expanded test coverage to test REFTful JSON attributes with and
without a value template.
* Fixed breaks cause by manual upstream merge.
* Added one extra blank line to make PyLint happy.
* Switched json_attributes to be a list of keys rather than a boolean.
The value of json_attributes can now be either a comma sepaated list
of key names or a YAML list of key names. Only matching keys in a
retuned JSON dictionary will be mapped to sensor attributes.
Updated test cases to handle json_attributes being a list.
Also fixed two minor issues arrising from manual merge with 0.58 master.
* Added an explicit default value to the json_attributes config entry.
* Removed self.update() from __init__() body.
* Expended unit tests for error cases of json_attributes processing.
* Align quotes
* Refactored WHOIS sensor to resolve assumed key errors
Altered it to now set an attribute key and value only if the attribute
is present in the WHOIS response. This prevents assumed keys (registrar)
from raising a KeyError on WHOIS lookups that don't contain registrar
information (onet.pl, wp.pl, for example).
* Removed non-used self._data
* WHOIS sensor now creates a new local attributes dict and overrides
* Corrected typos, refactored error cases to clear state adn attributes
* Resolved double return and refactored error logging
* Fixing missing en-gb support bug
* Microsoft TTS adding support for rate, volume, pitch and contour.
* Microsoft TTS fixing support for jp-jp.
* Fixing linting error on line 67
* make impossible things possible 🎉
* vacuum.xiaomi_miio: read dnd status properly instead of using imprecise dnd flag from vacuum_state
* vacuum.xiaomi_miio: use miio package instead of mirobo
* check only that wanted calls have taken place, ignore order of calls
* Fix linting issues
* Remove empty line after docstring
* Bugfix trigger state with multible entities
* Fix numeric state
* fix lint
* fix dict
* fix unsub
* fix logic
* fix name
* fix new logic
* add test for state
* add numeric state test for unsub
* add test for multible entities
* Update numeric_state.py
* Update numeric_state.py
* Update state.py
* Fix logic for triple match
* Add clear to numeric state
* clear for state trigger
This reverts commit cadd797200.
As discussed within #10708 we should chose a different implementation. Therefore we should revert this change to avoid a breaking change.
* Implement supported_features for the climate component
* Test supported features
* Convert generic thermostat to supported features
* Max / min temperature are not features
* Fix lint
* Min / max humidity are not features
* Linting
* Remove current temperature / humidity
* Move c-hacker-style constants to boring integers. Booo!
* Refactor all the climate platforms to use the new supported_features
* Force all climate platforms to implement supported_features
* Fix mistakes
* Adapt hive platform
* Move flags into a constant
* Calm the hound
* Add support for local api connection found in TellStick Znet Lite/Pro.
Added auto discovery support for all TelldusLive devices,
changed authentication method. Breaking change!
Upgraded tellduslive dependency
Update CODEOWNERS.
* Close any open configurator when configuration done
* Add support for Telldus Local API via config (#2)
* Updated dependency (addresses issue raised by @rasmusbe in https://github.com/home-assistant/home-assistant/pull/10435#issuecomment-344719714)
* Fix requested changes
* Fixed aliases warning message
* Fixed test cases
* Changing handling for google_assistant groups to treat them as lights - amending to include user info.
* Enable brightness, RGB, etc for groups in Google Assistant
* Revert color/hue/temp settings
* Change servce from light to homeassistant
* Fixed config_units
* Convert from light to switch
* Change group to switch
* Update tests to switch instead of light for group
* Add support for logarithm in templates
This adds a 'log' filter that takes the logarithm of the given value,
with an optional base number. The base defaults to 'e' - the natural
logarithm
* Remove usage of log10 in template filter 'log'
* Add logarithm as a global
This makes it possible to write:
'{{ log(4, 2) }}'