* 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
* 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
* system_log improvements
* Don't use ModuleNotFoundError which is 3.6+
* Don't use FrameSummary which was added in 3.5
* Don't trace stack for exception logs
* Handle test error in Python 3.4
* Make shell_command async
Use `asyncio.subprocess` instead of `subprocess` to make the
`shell_command` component async.
Was able to migrate over existing component and tests without too many
drastic changes.
Retrieving stdout and stderr paves the way for possibly using these in
future feature enhancements.
* Remove trailing comma
* Fix lint errors
* Try to get rid of syntaxerror
* Ignore spurious pylint error
* Implement data write retry for InfluxDB
This adds an optional max_retries parameter to the InfluxDB component
to specify if and how often the component should try to send the data
if the connection failed due to an IOError.
The sending will be scheduled for a retry in 20 seconds as often as the
user specified. This can be handy for flaky getwork connections between
the DB and Homeassistant or outages like daily DSL reconnects.
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* Add unittest for influx write retries
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* Add RetryOnError as helper decorator in util
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* Add unittests for RetryOnError
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* Use RetryOnError decorator in InfluxDB
This replaces the scheduling logic in the InfluxDB component with the
RetryOnError decorator from homeassistant.util
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* Make the linters happy
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* Implement a queue limit for the retry decorator.
This adds a queue limit to the RetryOnError handler. It limits the
number of calls waiting for be retried. If this number is exceeded,
every new call will discard the oldest one in the queue.
* influxdb: Add the retry queue limit option.
* Make the linter happy.
* Make pylint happy
* Log exception of dropped retry
* Move RetryOnError decorator to influxdb component.
* Fix bug in logging usage
* Fix imports
* Add newlines at the end of files.
* Remove blank line
* Remove blank line
* Refactored to new global json saving and loading
* Fixed emulated_hue tests
* Removed unnecassary error handling
* Added missing newline
* Remove unused imports
* Fixed linting error
* Moved _load_json wrapper out of the config class
* test the facebook notification component
* respond to hound feedback
* remove unnecessary line breaks
* parse_qs not needed with requests_mock
* remove facebook notifier from .coveragerc
* Implement entity and domain exclude/include for Alexa
* Switch to using generate_filter
* Use proper domain for turn on/off calls except for groups where we must use the generic homeassistant.turn_on/off
* travis fixes
* Untangle
* Lint
* Initial scene support
* Initial fan support
* ordering
* Initial lock support
* Scenes cant be deactivated; Correct the scene display category
* Initial input_boolean support
* Support customization of Alexa discovered entities
* Initial media player support
* Add input_boolean to tests
* Add play/pause/stop/next/previous to media player
* Add missing functions and pylint
* Set manufacturerName to Home Assistant since the value is displayed in app
* Add scene test
* Add fan tests
* Add lock test
* Fix volume logic
* Add volume tests
* settup -> setup
* Remove unused variable
* Set required scene description as per docs
* Allow setting scene category (ACTIVITY_TRIGGER/SCENE_TRIGGER)
* Add alert, automation and group support/tests
* Change display categories to match docs
* simplify down the display category props into a single prop which can be used on any entity
* Fix tests to expect proper display categories
* Add cover support
* sort things
* Use generic homeassistant domain for turn on/off
* Added logic to the alexa component for handling slot synonyms
* Moved note with long url to the top of the file
* Just made a tiny url instead of messing with Flake8
* Refactored to be more Pythonic
* Put trailing comma back
* add support for color temperature and color; also add some extra deviceInfo attributes
* change so that default behaviour doesn't turn off device if the action isn't handled
* add tests
* fix lint
* more lint
* use attributes were applicable
* removed debug logging
* fix unassigned if only None returned
* report more data in QUERY
* better tests for color and temperature
* fixes after dev merge
* remove deviceInfo as not part of a device state (PR #10399)
* fix after merge
* Implementation of `state_template` for the Universal media_player
* add tracking to entities in state template
* use normal config_validation
* fix tests, use defaults in platform schema, remove extra keys
* and test the new option `state_template`
* lint fixes
* no need to check attributes against None
* use `async_added_to_hass` and call `async_track_state_change` from `hass.helpers`
* Initial commit for request_sync functionality
* Fixes for Tox results
* Fixed all tox issues and tested locally with GA
* Review comments - api_key, conditional read descriptions
* Add test for service
* Add attribute to show who last un/set alarm.
This allows showing the name of the SPC user who last
issued an arm/disarm command and also allows for
automations to depend on this value.
* Optimize
* Update spc.py
* Update spc.py
* fix
* Fix test.
* Fix for removed is_state_attr.
* Add an option to serve ES6 JS to clients
* Rename es6 to latest
* Fixes
* Serve JS vrsions from separate dirs
* Revert websocket API change
* Update frontend to 20171110.0
* websocket: move request to constructor
* Improve handling and logging of unsupported owntracks message types
Added generic handlers for message types that are valid but not
supported by the HA component (lwt, beacon, etc.) and for
message types which are invalid. Valid but not supported
messages will now be logged as DEBUG. Invalid messages will
be logged as WARNING.
Supporting single "waypoint" messages in addition to the
roll-up "waypoints" messages.
Added tests around these features.
* Style fixes
* Initial commit of Vultr components
Have a working Vultr hub and binary sensor which pulls down the
following attributes of your VPS:
- Date created
- Subscription id (server id)
- Cost per month (in US$)
- Operating System installed
- IPv4 address
- label (human readable name)
- region
- number of vcpus
- which storage package chosen
- IPV6 address (if applicable)
- RAM amount
Working next on sensor and then testing / coverage.
* Added Vultr sensor for pending charges and current bandwidth. Refactored binary_sensor and hub too
* Corrected is_on bases
* Added basic tests for Vultr binary & platform
* Updated require files
* Changing test fixture to highlight different cases
* Written basic test for sensor.vultr
* Resolved linting errors and broken test
* Increase test coverage and corrected docs
* Resolved hound issues
* Revert back negative binary test
* Another hound resolve
* Refactoring and adding is switch, moving over to vultr branch
* Made Vultr components more resiliant to invalid configs
* Added negetive test for vultr binary sensor
* Added better testing of vultr sensor
* Resolved vultr platform test affecting subsequent vultr tests
* Moving VULTR components to single use design
* Added in sensor name config
* Added missing sensors var
* Resolved init data setting of sensors, added in name conf to switch
* Made the Vultr component more resiliant to startup failure with better alerting
* Various Vultr component changes
- Refactored sensor, binary_sensor, and switch to reference one subscription
- Renamed CURRENT_BANDWIDTH_GB monitored condition to CURRENT_BANDWIDTH_USED
- Improved test coverage
* Resolved local tox linting issue
* Added more testing for Vultr switch
* Improved test coverage for Vultr components
* Made PR comment changes to vultr binary sensor
* Made PR comment changes to Vultr sensor
* resolved PR comments for Vultr Switch
* Resolved vultr sensor name and improved tests
* Improved Vultr switch testing (default name formatting)
* Removed vultr hub failure checking
* MVP integration with Remember The Milk.
This version offers a service allowing you to create new issues in Remember The Milk.
* fixed pylint issue with import path
* - added files to .coveragerc as the server inerface is hard to test
- added tests for config file handling
* fixed lint error
* added missing docstrings
* removed stray edit
* fixed minor issues reported by @fabaff
* changed naming of the service, so that serveral accounts can be used
* added disclaimer
* moved service description to services.yaml
* fixed blank lines
* fixed structure of configuration
* added comment about httplib2
* renamed internal config file
* improved logging statements
* moved entry in services.yaml into separate folder.
Had to move the component itself as well.
* fixed static analysis findings
* mocked first test case
* fixed bug in config handling, fixed unit tests
* mocked second test case
* fixed line length
* fixed static analysis findings and failing test case
* also renamed file in .coveragerc
* control flow changes as requested by @balloob
* Implement adjustment
* Add color support
* fix lint
* Fix lint & use only RGB
* fix HSB + Test
* Add tests & fix bugs
* add rgb test
* add setColorTemperature
* Add color light support + tests
* Fix color temp
* use kelvin for converting
* use correct calculation
* Added timer component
* Reworked functionality a bit
* Fixed requested change
* Fixed state updates when finished
* Removing expired listeners, added events, changed services
* Added finish service
* Using timedelta parameters in start-service
* Cleanup
* Lint
* Updating state for remaining time
* Removed duration from cancel method
* Renamed service to fix disabled lint
* Some tests (incomplete)
* Relocated service descriptions
* Addressed requested changes
* Adjusted tests, added methods and events
* Added test for finish service, lint
* Code cleanp, using string states
* tzzz... one char...
* Proper usage of restore_state
* Some more cleanup
* Added ability to control when the on command is sent.
* Changed to allow only brightness command
* Code cleanup
* Added test cases for on command mode.
* Added addition test
* Changed brightness options to lower case.
* Fixed case of default value
* Remove default
* OwnTracks work. Beacon logic and testcases
The existing test cases don't really make clear what is being
tested and the iBeacon / Region / Zone / Tracker thing is all
a bit confused.
I'm distinguishing a fixed-place beacon used to trigger entrance
into an HA zone (as a Region Beacon) from a beacon affixed to a
portable or mobile object (as a Mobile Beacon). The behaviors
and test cases for those usages should be different. A Region Beacon
will be named the same as a Home Assistant Zone and seeing an event
from that beacon should trigger a device tracker update related
to that zone. It would be appropriate, though unnecessary, to
configure the Region Beacon with the GPS coordinates of its static
physical location.
A Mobile Beacon is not named after any HA Zone and seeing the beacon
triggers an update in HA setting the location of the beacon to the
current device_tracker location. In this way, when my_phone sees
the beacon on my_keys, the location of my_keys is set to where
my_phone is. And when my_phone stops seeing my_keys, my_keys location
is the location of my_phone the last time it saw them.
A Mobile Beacon's GPS information should be ignored because it's
almost certain to be incorrect because the beacon moves. In fact,
beacons typcially come configured with lat/lon as 0.0/0.0 so using
the location of the beacon in an update has a nasty habit of
setting you and your keys on the bottom of the Atlantic Ocean.
Leave message handling is changed to treat mobile beacons
differently from region beacons and gps regions.
active beacons should be a set. you shouldn't end up
with multiple "active" entries for the same beacon. Let's
enforce that with the correct data structure.
Added test for real-world bug that is fixed.
A series of mobile beacon and region beacon
enter and leave events could cause a mobile
beacon to stick to the tracking device even
though it had tracked through a "leave" event.
Changed two tests to look at the size
of the 'mobile_beacons_active' structure rather
than at the object which will allow this test
to work with any sort of list, set, etc.
* Removing excess logging and unnecessary try catch.
From review on PR #10183 I've removed some info logging
that was unnecessary and I've made the suggested changes
to an if block and a try/catch.
* Add unit test for hddtemp sensor.
* Remove sample fixture and include it in the code.
* Add test to raise coverage.
* Fix bug when host is not reachable.
* Minor code cleanups.
* More code cleanups.
* Add support for different display currencies in CoinMarkerCap sensor.
* Add test for CoinMarketCap sensor.
* Add test dependency to gen_requirements_all.
* Fix review comments: use string formatting and less string case chanes.
* Trend sensor now uses linear regression to calculate trend
* Added numpy to trend sensor test requirements
* Added trendline tests
* Trend sensor now has max_samples attribute
* Trend sensor uses utcnow from HA utils
* Trend sensor now completes setup in async_added_to_hass
* Fixed linter issues
* Fixed broken import
* Trend tests make use of max_samples
* Added @asyncio.coroutine decorator to trend update callback
* Update trend.py
* Add Google Domains component
* Fixes for hound
* Add Google Domains tests
* Fixes for hound
* Clean up Google Domains
* Add timeout to Google Domains
* Remove whitespace from blank lines
* Update google_domains.py
* Update google_domains.py
* Initial revision of fail2ban sensor
* Verified working, added tests
* Re-factored code so that log reading isn't called for each sensor
* Lint fixes
* Removed errant reset of last ban, added test to verify bans persist through update
* Removed for loop in read_log and replaced with regex per review request
* Refactored update to use current ban array for last ban state
- also was missing return False in timer for default behavior
* Removed CONF_SCAN_INTERVAL from PLATFORM_SCHEMA.extend
- renamed DEFAULT_SCAN_INTERVAL to SCAN_INTERVAL
* SCAN_INTERVAL changed to timedelta
* Force travis rebuild (last build timed out)
* Using compiled regex now
* Test including extra data on a no data trigger
* Match any dicts for default schema for event data
* Fix indentation
* Only check schema if one was configured
* Change persistent notification to avoid long text in entity state
* Tests for changed persistent notification
* Persistent notification state
* Test for component state
* Extended Ring DoorBell to support camera playback and wifi sensors
* Bump python-ringdoorbell to version 0.1.6
* Support to camera playback via ffmpeg
* Extended ringdoorbell sensors to report WiFi attributes
* Extended unittests
* Makes lint happy
* Added support to stickup cameras and fixed logic
* Fixed unittests for stickup cameras
* Makes lint happy
* Refactored attributions and removed extra refresh method.
* added implementation for monoprice 6-zone amplifier. This implementation is based on and very similar to russoun_rnet implementaion
* updated comments and cleaned up code
* updated comments and cleaned up code
* added unit tests
* removed 'name' attribute from platform schema.
* added monoprice.py to .coveragerc
* fixed lint
* fixed lint errors
* fixed lint errors
* added monoprice to requirements_all.txt
* fixed lint errors again
* implemented change requests
* fixed lint error
* added exception handling to setup_platform()
* replaced catchall with SerialException only
* added myself to CODEOWNERS
* fixed weird merge to CODEOWNERS
* http: Add headers key to json[_message]
* Add google_assistant component
This component provides API endpoints for the Actions on Google Smart
Home API to interact with Google Assistant.
* google_assistant: Re-add fan support
* google_assistant: Fix Scene handling
- The way I originally wrote the MAPPING_COMPONENT and the way it's actual
used changed so the comment was updated to match that.
- Use const's in more places
- Handle the ActivateScene command correctly
* google_assistant: Fix flakey compare test
Was failing on 3.4.2 and 3.5, this is more correct anyway.
* google_assistant: Use volume attr for media_player
* Cloud: connect to cloud
* Fix tests in py34
* Update warrant to 0.5.0
* Differentiate errors between unknown handler vs exception
* Lint
* Respond to cloud message to logout
* Refresh token exception handling
* Swap out bare exception for RuntimeError
* Add more tests
* Fix tests py34
* Added uptime sensor for homeassistant
* Fixed pylint and flake8 errors
* Made requested changes from PR
- Fixed stale docstrings
- Changed default state to None
- Added ability for user to use hours or days
* Fixed typo
* Added unit_of_measurement check to test
* Converted to async
- Changed tests to work with async
* Minor updates
* Added TODO to illustrate my intentions
* Resolved linting issue
* Resolved bool or file validation and updated tests
The tests have been updated to include mocks to assert a temp
ca cert exists as it should for the positive tests with an
additional negative test for a file not existing being tested.
* Resolved flake8 linting issues (test docstrings)
* Expose time module in Python Scripts
* Make dt_util available in Python Scripts
* Limit methods in time module
* Add time.mktime
* Limit access to datetime
* Add warning to time.sleep
* Lint
* fix for LocationParseError in netgear platform
* added unit tests for get_scanner()
* fixed houndci-bot warnings
* fixed lint warnings
* fixed lint warnings
* fixed broken test
* removed guard clause from netgear.py
removed all discovery related code from device_tracker
removed unnecessary unit test
* removed discovery related tests
* removed unused import
* removed unused import
* Initializing statistics sensor with data from database
* fixed broken test case
* usage of recorder component is now optional, thx to @andrey-git
* added test case for initialize_from_database
* Add recorder purge service
* Recorder test to match purge config
* Removed purge timer, move service handler to setup, add service description file
* Tests for recorder purge service
* Recorder purge timer rework, add purge service parameter, tests
* Purge service schema change
* Service description change value range
* First cleanup
* Fix name of config
* * Rename input_slider to input_number
* Update input_number to optionally display slider, input box, or both
* input_number support either input box or slider mode, but not both
* input_number : change service from select_value to set_value
* input_number : add test for mode setting to tests
* Added hysteresis attribute to threshold binary sensor
* Added threshold binary sensor hysteresis test case
* Changed threshold binary sensor property name to be more self explanatory
* Pulled default hysteresis value into top level declaration
* Fixed linter errors
* Fixed additional linter errors
* Move comment to docs
* New climate platform with MQTT
* Use STATE_OFF
* Basic tests for climate.mqtt
* lint
* actualy collect coverage
* First tests and fixes
* Add possibility to receive temperature via MQTT
* Require only either sensor or mqtt topic
* Add mqtt publishing for away mode, hold mode and aux heat.
* Use configurabe on/off payloads
* Add pessimistic mode
* Initialize aux and away with False instead of None
* Remove Sensor
* Use correct scheduling method
* Move all methods to coroutines
If an event contained a datetime.datetime object it would cause an
exception in the Splunk component. Most of the media_player
components do this in their `media_position_updated_at` attribute.
Use the JSONEncoder from homeassistant.remote instead of just using the
standard json.dumps encoder.
Fixes#9590
* Fixed away_mode for Ecobee thermostat. Now away mode is properly turned on using indefinite away hold.
* fixed lint warnings
* fixed lint warnings
* - now it is possible to use float values for ecobee temperature holds
- fixed a bug that caused an exception when temperature hold was set in away mode
- added unit tests for ecobee thermostat
* fixed lint errors
* fixed lint errors
* second try on rflink / cover
* no newline at end of file
* changed entity
* fixed comments from pvizeli
* removed :
* removed return 'unknown'
* Fixed comments from Rytilahti
* removed newline
* Reverted to None
* cleanup
* Cleanup
* Initial proposal for the input_datetime
* Linting
* Further linting, don't define time validation twice
* Make pylint *and* flake8 happy at the same time
* Move todos to the PR to make lint happy
* Actually validate the type of date/time
* First testing
* Linting
* Address code review issues
* Code review: Remove forgotten print()s
* Make set_datetime a coroutine
* Create contains_at_least_one_key_value CV method, use it
* Add timestamp to the attributes
* Test and fix corner case where restore data is bogus
* Add FIXME
* Fix date/time setting
* Fix Validation
* Merge date / time validation, add tests
* Simplify service data validation
* No default for initial state, allow 'unknown' as state
* cleanup
* fix schema
* Added new statistic attributes
Added new attributes:
- Cleaning count
- Total cleaning time
- Total cleaning area
- Time left to change main brush, side brush and filter
* Code corrections
Code corrections
* Remove wronge hanging indentation
* Added new attributes
ATTR_MAIN_BRUSH_LEFT
ATTR_SIDE_BRUSH_LEFT
ATTR_FILTER_LEFT
ATTR_CLEANING_COUNT
ATTR_CLEANED_TOTAL_AREA
ATTR_CLEANING_TOTAL_TIME
* Remove trailing white space
* Corrections of the unit test for new attributes
* Hound corrections
* Init self.clean_history, self.consumable_state
* Hound correction
* - Cleaning time and total cleaning time shown in minutes
- Cleaned area and total cleaned area shown in square meters
- Main brush left, side brush left, filter left time shown in hours
- Display of the unit of measurement
* Remove trailing white spaces
* Fixed wrong continued indentation
* Fixed Hound
* Fixed Hound
* Added new statistic attributes
Added new attributes:
- Cleaning count
- Total cleaning time
- Total cleaning area
- Time left to change main brush, side brush and filter
* Code corrections
Code corrections
* Remove wronge hanging indentation
* Init self.clean_history, self.consumable_state
* Hound correction
* Remove UOM
* Merge
* Init self.clean_history, self.consumable_state
* Hound correction
* Init self.clean_history, self.consumable_state
* Hound correction
* Removed double declarations
* MQTT Cover - Add availability_topic for online/offline status
Added topic, configurable payloads, and tests.
* Merge branch 'dev' into mqtt-cover-availability
* Revert "Merge branch 'dev' into mqtt-cover-availability"
This reverts commit 46d29794ba.
* Added newline at end of test_mqtt.py
* Fixed lint issue (newline at EOF)
* Fixed lint issue (newline at EOF)
* Updated call signature for other tests
* Fixed availability message callback
* - Added support for ARM_NIGHT for manual_mqtt alarm
* - port "Add post_pending_state attribute to manual alarm_control_panel #9291" to manuql_mqtt
* - port "Fixed manual alarm not re-arm after 2nd trigger #9249" to manuql_mqtt
* - port "Add manual alarm_control_panel pending time per state #9264" to manuql_mqtt
* - Updated test_trigger_with_specific_pending to simulate real scenario e.g. arm the system then trigger
* new geo rss events sensor
* SCAN_INTERVAL instead of DEFAULT_SCAN_INTERVAL
* removed redefinition CONF_SCAN_INTERVAL
* definition of self._name not required
* removed unnecessary check and unnecessary parameter
* changed log levels
* fixed default name not used
* streamlined sensor name and entity id generation, removed unnecessary parameter
* fixed issue for entries without geometry data
* fixed tests after code changes
* simplified code
* simplified code; removed unnecessary imports
* fixed invalid variable name
* shorter sensor name and in turn entity id
* increasing test coverage for previously untested code
* fixed indentation and variable usage
* simplified test code
* merged two similar tests
* fixed an issue if no data could be fetched from external service; added test case for this case
* Add support for multi-entity recent fetch of history. Add graph component
* Rename graph to history_graph. Support fast fetch without current state.
* Address comments
* MQTT Binary Sensor - Add availability_topic for online/offline status
Added topic, configurable payloads, and tests.
* Relocated state subscribe function
Moved state subscribe function to follow the state listener function.
* Add reload service
* add reload test
* Use global variable
* remove white space ....
* adjust as suggested
* remove annoying white space....
* fix travis
* fix travis, again
* rename Load_scripts to Discover_scripts
Travis complains that "Load_scripts" is an invalid name (I don't know why)
* Update python_script.py
* renamed add_devices to async_add_devices according to hass naming scheme
* replaced some occurencies of async_add_entites to async_add_devices
* fixed unit test
* fixed unit test
The DTE Energy Bridge seems to return the current energy
usage randomly in either W or kW. The only way to tell the difference
is if there is a decimal or not in the result.
Also added some tests.
* Basic MQTT vacuum support
* PR feedback
* Support for fan_speed and send_command services
* Fix configurable topics
* Use configurable bools for cleaning/docked/stopped state
* Fix language in docstring
* PR feedback
* Remove duplicate vacuum/state topic defaults
* Fix incorrect template for docked value
* Move direction like default mqtt platfom/components
* fix None on templates
* fix tests
* fix int
* fix tests
* ready to merge
* rename xiaomi to xiaomi_aqara
* rename xiaomi vacuum and xiaomi phillips light to xiaomi miio
* update discovery and tests
* style
* update discovery and tests
* Still use Philips as name
* - Enhanced manual alarm_control_panel config so that you can specify different pending time for different alarm state
* - Fixed demo alaram control panel
* - Updated configuration structure for state specific pending times
* - Addressed comment
* Address code review comments
* - Fixed failing tests
- Updated demo alarm component to use new per state pending_time setting
* - Removing previously added comment which might have caused build to fail?
* - moved "copy.deepcopy(config)" out of loop so config is only copied once
* add datetime and support for unpacksequence
add datetime to builtin and support for unpacksequence
a,b = (1,2)
for a,b in [(1,2),(3,4)]
* add test for python_script
* fix test
* restore previous test
restore previous tests, removed by mistake sorry...
* fix test
* Update test_python_script.py
* fix travis
* fix test
* Update test_python_script.py
* Add files via upload
* fix travis...
* Allow multiple observations of same entity
Why:
* There may be different probabilities for multiple states of the same
entity.
This change addresses the need by:
* Keeping a list of observations for each entity to check on each state
change of the given entity.
* Adding a numeric id to each observation so that they can be
effectively added and removed from `self.current_obs`.
* Adding a test to confirm functionality.
* fix overzealous indenting
* Added mqtt_statestream component
* Added tests for mqtt_statestream component
* mqtt_statestream: add test for valid new_state
* mqtt_statestream: Don't set initialized state
* mqtt_statestream: Switch to using async_track_state_change
* Cleanup
* Add HTTP Basic auth to RESTful Switch
* Remove redundant hass passing
* Initialize to current state
The state used to be None until the first periodic poll.
This commit refactors async_update so it can be used during setup as well,
allowing the state to start out with the correct value.
* Refactor turn_on/turn_off device communication
* Remove lint
* Fix Travis errors
* flux: fix for when stop_time is after midnight
* flux: fix imports
* flux: add missing check when now is after midnight
* flux: one more try; should fix all use cases now
* flux switch: fix lint
* flux switch: add new tests
* flux switch: fix tests lint
* flux switch: fix tests docstrings
* Adding ZWave CentralScene activation handler.
* Migrated CentralScene logic to node_entity.py
Removed extraneous logging
Modified scene_activated event to send the scene_id and scene_data separately
* Adding unit test for ZWave central scene activation
* Removed return to allow node statistics to update after central scene message is received
* Bayesian Binary Sensor
Why:
* It would be beneficial to leverage various sensor outputs in a
Bayesian manner in order to sense more complex events.
This change addresses the need by:
* `BayesianBinarySensor` class in
`./homeassistant/components/binary_sensor/bayesian.py`
* Tests in `./tests/components/binary_sensor/test_bayesian.py`
Caveats:
This is my first time in this code-base. I did try to follow conventions
that I was able to find, but I'm sure there will be some issues to
straighten out.
* minor cleanup
* Address reviewer's comments
This change addresses the need by:
* Removing `CONF_SENSOR_CLASS` and its usage in `get_deprecated`.
* Make probability update function a static method, and use single `_`
to match project conventions.
* Address linter failures
* fix `device_class` declaration
* Address Comments
Why:
* Not validating config schema enough.
* Not following common practices for async initialization.
* Naive implementation of Bayes' rule.
This change addresses the need by:
* Improving config validation for observations.
* Moving initialization logic into `async_added_to_hass`.
* Re-configuring Bayesian updates to allow true P|Q usage.
* address linting issues
* Improve DRYness by adding `_update_current_obs` method
* update doc strings and ensure functions are set up properly for async
* Make only 1 state change handle
* fix style
* fix style part 2
* fix lint
* Emulate set_current_position in cover.template
* Add opportunistic mode
* Prevent another move when cover is already moving. Add tests for opotunistic/timed-delay mode
* Remove timed-move capabilities
* Set init state to unknown
* cleanup template
* Update test_template.py
* Add support for offset for the workday sensor
* Update tests for workday sensor
* Changed from 'offset' to 'days_offset'
* Attributes bugfix (dictionary key variable repeated with different values)
* Add support for Automatic OAuth2 authentication
* Fix async conversion of configurator
* Rename method for async
* Use hass.components to get configurator component
* Fix typo
* Move session data to hidden directory
* Make configurator callback optional
* Added possibilities to use template in the command_line sensor
* Minor style guideline conforms
* Minor style guideline conforms
* Added new test for template rendering
* Minor style guideline conforms
* Minor style guideline conforms
* Fixed failing testcases
* Fix style violations
* fix code pretty
* Initial implementation of Asterisk Mailbox
* Rework asterisk_mbox handler to avoid using the hass.data hash. Fix requirements.
* Handle potential asterisk server disconnect. bump asterisk_mbox requirement to 0.4.0
* Use async method for mp3 fetch from server
* Add http as dependency
* Minor log fix. try to force Travis to rebuild
* Updates based on review
* Fix error handling as per review
* Fix error handling as per review
* Refactor voicemail into mailbox component
* Hide mailbox component from front page
* Add demo for mailbox
* Add tests for mailbox
* Remove asterisk_mbox sensor and replace with a generic mailbox sensor
* Fix linting errors
* Remove mailbox sensor. Remove demo.mp3. Split entity from platform object.
* Update mailbox test
* Update mailbox test
* Use events to indicate state change rather than entity last-updated
* Make mailbox platform calls async. Fix other review concerns
* Rewrite mailbox tests to live at root level and be async. Fixmailbox dependency on http
* Only store number of messages not content in mailbox entity
* Add new service `clean_spot` to vacuums
- Add as base component service, with associated support flag to make it optional
- Implement on Demo vacuum
- Implement on Xiaomi vacuum
- Update tests for platforms Demo and Xiaomi
- Change default icon for vacuums to `mdi:roomba`, but keep the one for the Xiaomi
- (In a polymer PR: add new service to command toolbar in the 'more-info' card)
* Add `clean_spot` service description
* fix default properties for vacuum component
* Do not use pychromecast.Chromecast for Cast Groups
pychromecast.Chromecast creates Chromecast instance with friendly_name and cast_type of the device and not of a group.
Which leads to collisions
* Update cast.py
* using hass.data
* Fixed and extended tests
* Line length in tests
* Lint in tests
* Fix tests for Demo vacuum platform (and increase coverage)
* increase coverage of xiaomi vacuum tests and include in coverage
Also little fixes
* remove print statement
* Add DEBUG-level log for db row to native object conversion
This is now the bottleneck (by a large margin) for big history queries, so I'm leaving this log feature in to help diagnose users with a slow history page
* Rewrite of the "first synthetic datapoint" query for multiple entities
The old method was written in a manner that prevented an index from being used in the inner-most GROUP BY statement, causing massive performance issues especially when querying for a large time period.
The new query does have one material change that will cause it to return different results than before: instead of using max(state_id) to get the latest entry, we now get the max(last_updated). This is more appropriate (primary key should not be assumed to be in order of event firing) and allows an index to be used on the inner-most query. I added another JOIN layer to account for cases where there are two entries on the exact same `last_created` for a given entity. In this case we do use `state_id` as a tiebreaker.
For performance reasons the domain filters were also moved to the outermost query, as it's way more efficient to do it there than on the innermost query as before (due to indexing with GROUP BY problems)
The result is a query that only needs to do a filesort on the final result set, which will only be as many rows as there are entities.
* Remove the ORDER BY entity_id when fetching states, and add logging
Having this ORDER BY in the query prevents it from using an index due to the range filter, so it has been removed.
We already do a `groupby` in the `states_to_json` method which accomplishes exactly what the ORDER BY in the query was trying to do anyway, so this change causes no functional difference.
Also added DEBUG-level logging to allow diagnosing a user's slow history page.
* Add DEBUG-level logging for the synthetic-first-datapoint query
For diagnosing a user's slow history page
* Missed a couple instances of `created` that should be `last_updated`
* Remove `entity_id` sorting from state_changes; match significant_update
This is the same change as 09b3498f41 , but applied to the `state_changes_during_period` method which I missed before. This should give the same performance boost to the history sensor component!
* Bugfix in History query used for History Sensor
The date filter was using a different column for the upper and lower bounds. It would work, but it would be slow!
* Update Recorder purge script to use more appropriate columns
Two reasons: 1. the `created` column's meaning is fairly arbitrary and does not represent when an event or state change actually ocurred. It seems more correct to purge based on the event date than the time the database row was written.
2. The new columns are indexed, which will speed up this purge script by orders of magnitude
* Updating db model to match new query optimizations
A few things here: 1. New schema version with a new index and several removed indexes
2. A new method in the migration script to drop old indexes
3. Added an INFO-level log message when a new index will be added, as this can take quite some time on a Raspberry Pi
* Xiaomi vacuum as component with switch, sensors and services
- Conversion from switch platform to async component.
- Add services proposed in #8416 to the new component, with shorter names.
- Add sensors for the vacuum robot as a selectable list from `battery`, `state`, `error`, `fanspeed`, `clean_time` and `clean_area` (the state attributes of the switch). The sensors don't poll, but listen to a signal to update the state, the switch fires this signal when updating.
- Assign default icons to sensors and the switch (`mdi:google-circles-group` looks like the robot!)
* path change in requirements_all (from switch platform to component)
* copy pasting is a bad habit
* services to the components services.yaml, modify .coveragerc
* review: use with multiple hosts, fix calls to async_add_devices, fix ranges for services
* `icon_for_battery_level` util method
* Xiaomi vacuum as platform of new component vacuum
- Created new component `vacuum` from a ToggleEntity.
- Add services `turn_on`, `turn_off`, `cleaning_play_pause`, `stop`, `return_to_base`, `locate`, `set_fanspeed` and `send_command`.
- Remove the main switch for the xiaomi vacuum (the toggable main entity is the switch).
- Add `support flags` for the common services
- Assign default icons to sensors and the switch (`mdi:google-circles-group` looks like the robot!)
- Move services descriptions to a yaml file for the new component.
- Update requirements_all.
- Update coveragerc.
* fix coveragerc
* fix battery icon helper to use more icons
* remove sensors, create properties and support flags for custom UI
* cleaning
* updated state_attrs for filtering in UI, renamed platform to simply `xiaomi`
* fix platform rename
* change fanspeed and expose `fanspeed_list` to use speed steps
* minor fixes
- Rename service `start_pause`
- Add 'Error' attribute only if `got_error`.
- Minor changes
* rename state attrs
* rename state attrs
* review changes: cut fan__speed, style changes, remove logging, and more
* add ATTR_COMMAND = 'command' to const
* pop entity_id from service data
* remove property accessor for vacuum object
* lint fix
* fix extra attrs names
* module level functions for calling the services
* params as optional keyword for `send_command`
* params as optional keyword for `send_command`, remove debug logs
* explicit parameters for `set_fan_speed` and `send_command`
* Demo platform for the vacuum component
* vacuum tests for the Demo platform
* some fixes
* don't omit vacuum
* vacuum tests for the Xiaomi platform
* fix test
* fix
* fix xiaomi test
* fix coveragerc
* test send command
* fix coveragerc
* fix string formatting
* The coverage is to low. It need 93% or more
* Allow reporting some state attributes as tags to InfluxDB
Some state attributes should really be tags in InfluxDB. E.g.
it is helpful to be able to group by friendly_name, or add a custom
attribute like "location" and group by that. Graphs in Grafana are much
easier to read when friendly names are used, and not node ids.
This commit adds an optional setting to InfluxDB config:
'tags_attributes'. Any attribute on this list will be reported as tag
and not as field to InfluxDB.
* Allow overriding InfluxDB measurement for each reported item separately
Bundling all items with the same "unit of measurement" together does not
always makes sense. For example, both "relatively humidity" and "battery
level" are reported as "%", but I'd rather see them as separate
measurements in InfluxDB. This commit allows for 'influxdb_measurement'
attribute. When set on node, it will take precedence over the global
'override_measurement' and component-specific 'unit_of_measurement'.
* Minor updates to InfluxDB component improvements, as suggested by
@MartinHjelmare.
* Moved per-component config from 'customize' into 'influxdb'
configuration section. The following three sub-sections were added:
'component_config', 'component_config_domain' and
'component_config_glob'. The sole supported per-component attribute
at this point is 'override_measurement'.
* Lint
* Fixed mocked entity_ids in InfluxDB tests to be in domain.entity_id
format, to satisfy EntityValues requirements.
* Added tests for new InfluxDB configuration parameters
* Fixes to some docstrings
* Add mochad light component
This commit adds a new component to control x10 dimmers/lights with
mochad.
* Create comm_type and address constants
The comm_type and address conf constants are shared between all mochad
devices because they are required information used for configuring a
device. This commit moves the definition into const.py so they're
consistent between all component types.
* Add support for LaunchRequest alexa intent
* Support LaunchRequest for multiple skills
* formatting
* adding tests to cover launch request
* formatting
* Honeywell fixes and improvements
Give the Honeywell device a state ('On', 'Off', etc) that
can be displayed to user and understood by other components.
Previously this was always 'Unknown'. Update also raises a
state_changed event when a new temperature is polled.
These two together fix an issue (#8688) where Honeywell
climate data couldn't be logged in InfluxDB.
* Roll back some changes
These were not necessary to achieve the result I wanted.
* Renamed RoundThermostat's 'device' member for greater clarity
Now called 'client'
* Improve and simplify discovering thermostat mode
Per code review, this is a rather neater way to discover the thermostat mode
* Update tests for compatibility with new component
The tests previously relied upon the update() method being
called in the constructor. This is no longer the case.
* Address formatting review comment
Parens not necessary
* This system mode is not certain to apply to domestic hot water
Moved the mode lookup to only happen on update of radiator devices,
since hot water devices seem to be treated differently and I can't test.
* Clean up remote component
* Don't have device be required in send_command service and method.
* Don't have entity_id be required in the base service schema.
* Don't always add activity in the data dict for a service call.
* Update harmony remote platform according to new service schema.
* Remove not needed properties and attributes from the Kira remote
platform.
* Add send_command method to demo platform.
* Add tests and remove duplicate tests.
* Break out required argument as positional argument
* Fixed issue with routers in bridge mode
- Router in brdige mode apparently don't report all of the stats
- Re-wrote the data_format function so it's a bit easier to follow and able to log keys that aren't supported by a router in a given mode
- Changed config so that it properly ignores conditions when not explicitly listed
- Added tests to check for the above and also to verify we log that a key doesn't exist rather than throwing an exception
* Mistakenly was calling MONITORED_CONDITIONS in data_format
- Changed to be the actual config values to prevent log error
* Update zwave.py to work with updated OpenZwave library
Update zwave.py to work with updated OpenZwave library
* Update zwave.py
* Update zwave.py
* Update to fix garage door openers
Update to fix garage door support for latest version of openzwavelib
* Update to cover.zwave list of states
Update to cover.zwave to provide list of states based on dev version of
openzwave lib
* Some values not saved
* Formatting fix
* Formatting fix
* Variable typo
* Formatting fix
* Formatting
* Variable Update
Variable Update and properties added
* Formatting fixes
* Formatting Fix
* Update test case for door states
* Formatting / Testing process fix
* Formatting
* Formatting / Test Fixes
* Variable rename
* Added members to CoverDevice
* Removed un-needed else
* Formatting
* Formatting
* Variable name changes and const updates
* Changed variable names to cover_state
* Added constains into const.py
* Updated to change the main state on the cover device
* Fixes
* Formatting fixes
* Formatting/Variables
* Formatting
* Variable fixes
* Import update
* Formatting / Variables
* Update test for new states
* Revert state changes
* Test fix
* Variable Fix
* Formatting
* Variable typo
* Missing constant
* Variable fix
* Requested changes
* Added is_opening
* Added is_closing
* Updated test based on changes
* Formatting
* Changed cover_state back to _state
* Formatting and variable fixes
* Test fixes
* Formatting and variable touchup
* Formatting
* Optimizations
* Add new cover features to demo
* Add tests for demo cover closing/opening
* Remove unused STATE_STOPPED
* Add tests for new zwave cover values
* Manual alarm with MQTT control
* Duplicate manual control panel code instead of extending it
* Duplicate manual alarm test as well; modify for manual_mqtt
* Add MQTT-specific tests for manual_mqtt alarm
* Add intent component
* Add intent script component
* Add shopping list component
* Convert Snips to use intent component
* Convert Alexa to use intent component
* Lint
* Fix Alexa tests
* Update snips test
* Add intent support to conversation
* Add API to view shopping list contents
* Lint
* Fix demo test
* Lint
* lint
* Remove type from slot schema
* Add dependency to conversation
* Move intent to be a helper
* Fix conversation
* Clean up intent helper
* Fix Alexa
* Snips to use new hass.components
* Allow registering intents with conversation at any point in time
* Shopping list to register sentences
* Add HTTP endpoint to Conversation
* Add async action option to intent_script
* Update API.ai to use intents
* Cleanup Alexa
* Shopping list component to register built-in panel
* Rename shopping list intent to inlude Hass name
* 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
* 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
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.
* 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.
* 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
* 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
* 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
* Fixed mqtt subscription filter on sys $ topics
* fixed linting issue
* added unit tests for $ topics and changed fix to use re.escape
* merge upstream/dev mqtt unit tests
* Update test_init.py
* Open Hardware Monitor sensor
Platform which is able to connect to the JSON API of Open Hardware Monitor and adds sensors for the devices.
* Remove copyright in header, not needed.
* - Removed old code
- Fixed typo’s in comments
- Removed log spamming
- Removed code that was unnecessary
- Use requests instead of urllib
- Moved sensor update functionality to data handler, to remove unwanted constructor parameters
* Fixed typo in comment
Added tests
* Added default fixture, to stabilize tests
* - Fix for values deeper than 4 levels, no longer relies on fixed level
- Fixed tests
* Removed timer in preference of helper methods
* Moved update functionality back to Entity….
Updated SCAN INTERVAL
* Added timeout to request
Removed retry when Open Hardware Monitor API is not reachable
Fixed naming of sensors
Flow optimalisations
Fixed tests to use states
* Remove unused import
* Update InfluxDB to handle datetime objects
Updates the InfluxDB regex to ignore datetime objects being coverted
into float values.
Adds tests to the component to ensure datetime objects are corectly
handled.
* Fix Hound errors
Fixes errors from Hound bot
* Update InfluxDB to handle multiple decimal points
Changes the way InfluxDB handles values such as 1.2.3.4 to be 1.234 so
it stores in InfluxDB as a valid float value
* Fix lint issues
Reduce the size of a line for the linter
* Update InfluxDB to pass on unknown variable
If we get an error trying to convert a variable to a float, let's ignore
it completely
* Make InfluxDB Regex constants
Makes the Regex's used by InfluxDB constants so they don't need to be
compiled each time
* cleanup
* fix lint
* Update regex
* fix tests
* Fix JSON body missing new line character
* fix exceptions
* Use standard entity_ids for zwave entities
* Include temporary opt-in for new entity ids
* Update link to blog post
* Update tests
* Add old entity_id as state attribute
* Expose ZWave value details
* Update tests
* Also show new_entity_id
* Just can't win with this one
* Setup to send component data is option is enabled
* testcases, as well as moved to a single boolean, passed to the function
* fixed pep8 failures
* Clarify config option.
* Allow device tracker platforms to specify picture
* Allow device tracker to specify icon during discovery
* Clean up and add tests
* Fix lint
* Fix test
* Make percentage string values as floats in InfluxDB
Currently Z-wave and other compontents report an attributes battery
level as an integer, for example
```yaml
{
"is_awake": false,
"battery_level": 61,
}
```
However, some other components like Vera add the battery level as a
string
```yaml
{
"Vera Device Id": 25,
"device_armed": "False",
"battery_level": "63%",
"device_tripped": "False",
}
```
By removing any % signs in the field, this will send the value to
InfluxDB as an int, which can then be used to plot the data in graphs
correctly, like other percentage fields.
* Add tests and remove all trailing non digits
Adds tests and now removes all trailing non-numeric characters for
better use
* Update variable name for InfluxDB digit checks
Updates the variable used for the regex to remove trailing non digits
* Fix linting errors for InfluxDB component
Fixes a small linting error on the InfluxDB component
* dismiss service for persistent notifications
Unnecessary notifications can now be removed automatically. Added a
dismiss service to remove persistent notifications via script and/or
automation.
* removed unnecessary loop
loop removed
* Add initial version
* Fix requirements
* Prefer logging over printing
* Set executor thread name on >Py36 only
* Add tests
* Lint
* Add restrictedpython to test dependencies
* Create python_script.py
From doc:
```
However, an empty dict ({}) is treated as is. If you want to specify a list that can contain anything, specify it as dict:
>>> schema = Schema({}, extra=ALLOW_EXTRA) # don't do this
>>> try:
... schema({'extra': 1})
... raise AssertionError('MultipleInvalid not raised')
... except MultipleInvalid as e:
... exc = e
>>> str(exc) == "not a valid value"
True
>>> schema({})
{}
>>> schema = Schema(dict) # do this instead
>>> schema({})
{}
>>> schema({'extra': 1})
{'extra': 1}
```
* Add support for Vanderbilt SPC alarm panels.
* Arm/disarm + read state
* Autodiscover and add motion sensors
* Fix code formatting.
* Use asyncio.async for Python < 3.4.4.
* Fix for moved aiohttp exceptions.
* Add docstrings.
* Fix tests and add docstrings.
* Fix#7758 subscription expiration/removal
Removes a subscription after receiving an HTTP 410 response when trying to send a new message.
* Fix tests failing due to additional call
* Fix code style
* Lint
* Remove setting up an hbmqtt broker
* Don't pass loop to web.Application in tests
* Use .query instead of deprecated .GET for aiohttp requests
* Fix closing file resource
* Do not use asyncio mark
* Notify.html5 - PyJWT: Use options to disable verify
* Yamaha: Test was still using deprecated ip
* Remove pytest-asyncio
* starting light template component
* linting/flaking
* starting unit tests from copypasta
* working on unit testing
* forgot to commit the test
* wrapped up unit testing
* adding remote back
* updates post running tox
* Revert "adding remote back"
This reverts commit 852c87ff96.
* adding submodule back from origin
* updating submodule
* removing a line to commit
* re-adding line
* trying to update line endings
* trying to fix line endings
* trying a different approach
* making requested changes, need to fix tests
* flaking
* union rather than intersect; makes a big difference
* more tests passing, not sure why this one's failing
* got it working
* most of the requested changes
* hopefully done now
* sets; the more you know
* Added new commands and functionality to the harmony remote component.
-This includes the ability to optionally specify a number of times to repeat a specific command, such as pressing the volume button multiple times.
-Also added a new command that allows you to send multiple commands to the harmony at once, such as sending a set of channel numbers.
-Updated the unit tests for these changes.
* Fix flake8 coding violations
* Remove send_commands command and make send_command handle a single or list of commands
* Remove send_commands tests
* Update itach and kira remotes for new send_command structure. Fix pyharmony version in requirements_all.txt
* Fix incorrect variable name
* Fix a couple minor issues with remote tests
* Make ssh and telnet connections continuous in asuswrt
* Refactored SSH and Telnet connections into respective classes.
* Fixed several copy-paste typos and errors.
* More typos fixed.
* Small changes to arguments, to pass automated tests.
* Removed unsupported named arguments.
* Fixed a couple of mistakes in Telnet, and other lint errors.
* Added Telnet tests, and added lint exceptions.
* Removed comments from tests, as they irritated the hound.
* Ignore attribute changes in automation trigger from/to
* Quote names in deprecation warnings
This makes it somewhat easier to read if the suggestion happens to be
named "to".
* Add test with same state, new attribute value
* Remove global hass
* Http.auth test no longer spin up server
* Remove server usage from http.ban test
* Remove setupModule from test device_sun_light_trigger
* Update common.py
* # This is a combination of 3 commits.
# The first commit's message is:
Add seperate zwave panel
# The 2nd commit message will be skipped:
# unused import
# The 3rd commit message will be skipped:
# Use get for config
* Add seperate zwave panel
* Modify set_config_parameter to accept setting string values
* descriptions
* Tweaks
* Tweaks
* Tweaks
* Tweaks
* lint
* Fallback if no config parameteres are available
* Update services.yaml
* review changes
* Refactor color profiles to a class
* Refactor into preprocess_turn_on_alternatives
* LIFX: use light.preprocess_turn_on_alternatives
This avoids the color_name duplication and gains support for profile.
* Add kelvin parameter to light.turn_on
* Add brightness_pct parameter to light.turn_on
* LIFX: accept brightness_pct in effects
* Add test of kelvin/brightness_pct conversions
* Add sonos alarm clock update service
* Add tests and break lines
* Fix style errors
* Make test work with python<3.6
* Fix last two pylint errors
* fix new line to long errors
* SMTP notify enhancements: HTML emails and customization options
- Send full HTML emails, with or without inline attached images.
- Custom `timeout`.
- Custom `product_name` identifier for the `FROM` and `X-MAILER` email headers.
- New HTML email test
* `sender_name` instead of product_name
- Change `sender_name` instead of `product_name`.
- No changes in `X-Mailer` header.
- `From` header as always unless you define the new `sender_name` parameter.
* No longer require pyunify during tests
* No longer require cast during tests
* No longer required dependency for tests
* No longer require pymochad for tests
* Astral is a core dependency
* Avoid having to install datadog dependency during tests
* CMUS test doesn't test anything
* Frontier Silicon doesn't test anything
* No longer require mutagen
* Update requirements_test_all.txt
* Remove stale comment
* Support adding different server locations
* Rename variables and move CONF_ const into component as requested in review
* Fix unittests
* Forgot to add tests for microsoft_face_identify
* Generate a new updateDate with every call
This should fix#7459
Tests need to be updated in another commit.
* Replace STATIC_TIME with datetime object check
Removing the "DATE" argument from the Alexa component's configuration (because it is now dynamically generated) requires this commit's changes to the test cases to check that the updateDate data is a datetime type rather than a specific hardcoded value ('2016-10-10T19:51:42.0Z').
* Fix brackets
* # This is a combination of 3 commits.
# The first commit's message is:
Add seperate zwave panel
# The 2nd commit message will be skipped:
# unused import
# The 3rd commit message will be skipped:
# Use get for config
* Add seperate zwave panel
* more info
* Add usercodeview
* Improve api
* Improve api
* Separate api into own file.
* disable missing import
* review changes
* Tests 1
* Verify that we fetch data from groups
* Tests groups
* config 1
* usercode 1
* Api mods
* Tweak API
* docstrings
* 100% api testing
* Refactor sun component for correctness
* Convert datetimes to dates for astral
* Fix tests for updated code
* Fix times now that calcs are fixed
* Move sun functions to helpers
* Fix flake on new file
* Additional tweaks from review
* Update requirements
* Convert automatic device tracker to push updates
* Update test
* Add to coveragerc
* Fire hass events when automatic update received
* Change brace indentation
* correct MQTT subscription filter
* wildcard handling (#) fixed
* wildcard handling (#) fixed
* added tests for topic subscription like +/something/#
* function names changed (line too long)
* using raw strings for regular expression
import order changed
* add support for shuffle toggling on Spotify component.
this also required adding support for shuffle on the
media_player component.
* lint
* Use ATTR_MEDIA_SHUFFLING for service handler param
* Line too long fix
* fix tests
* add shuffle set to demo mediaplayer
* rename shuffle attribute
* new implementation without mqtt
* fixed lint findings
* fixed more lint findings
* fixed final flak8 error
* added unit tests for platform "plant"
* - changed status to "OK" / "problem"
- added attribute "problem" with details on the problems
- removed unused constant
- setting icon to "?" until we have meaningful data
* reformatted code to meet line length requirements
* binary_sensor.workday: fix handling of states vs provinces
* Add test cases for workday sensor with states
* remove redundant assignment
* Repair unit test to improve coverage
Patch from Wolf-Bastian Pöttner
* Fix handling of invalid states/provinces
* fix indentation to satisfy pylint
* Remove global limit on white light temperature
Here are the supported temperatures of some popular bulbs:
Philips Hue: 2000K-6500K (the current 500-154 mired range)
LIFX Color 1000: 2500K-9000K
IKEA TRÅDFRI: 2200K, 2700K, 4000K
Obviously, Home Assistant cannot enforce a global limit and work properly
with all of these bulbs. So just remove the limit and leave it up to each
platform to work it out.
This commit updates the existing users and adds a clamp to Hue (where the
limit appears to have originated). It does not attempt to update other
platforms that might need extra handling of the larger range that is now
possible.
* Add min_mireds/max_mireds state attributes to lights
* Support min_mireds/max_mireds with LIFX lights
* Allow InfluxDB to blacklist domains
This adds an option to InfluxDB to blacklist whole domains. This is
useful for domains like automation or script, where no statistic data
is needed.
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* Add unittest for InfluxDB domain blacklist
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* Use common include/exclude config for InfluxDB.
Its now the same syntax as it is for recorder.
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* Add unittests for InfluxDB include whitelist.
There where no tests for that feature before.
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
* rss_feed_template initial checking
* lint
* Remove use of deprecated cgi-escape()
* Switching back to chardet==2.3 (resolve failing tests with 3.0)
* Code and test improvments
* Option 'requires_api_password', default is True
* Fixes utf-8 encoding no longer required by libopenzwave0.3.3
Removes byte encoding for values operation mode, fan mode and swing
mode.
* Fix zwave climate tests for utf-8 change
* ready for PR
* minor fix
* another minor fix
* new platform mqtt_json
* using ATTR constants
* voluptuous check on JSON payload
* voluptuous check on JSON payload
* Value of 0 should not be considered `unknown`.
* Reflect disconnect state in entity states.
* Due to adding unknown state on disconnect, the amount of reconnects can sometimes be more. Test for at least 2 reconnect attempts.
* exposed content_type in rest_command, which allows for manually specifying the content_type for more-strict api endpoints
* fixed up column length
Length was 86 chars, and it needed to be 79
* double import of HTTP_HEADER_CONTENT_TYPE
Removed the accidental double-import of HTTP_HEADER_CONTENT_TYPE
* moved rest_command-specific config value into component
* if no content_type, default to None
* unit test
* newline
* unused CONTENT_TYPE_TEXT_PLAIN
* removed the http-agnostic abstraction hass provided in favor of aiohttps hdrs constant
* Managing binary payloads
Hello,
background: I wrote a HA camera component that gets the image from a binary payload. I'm testing it with Zanzito (https://play.google.com/store/apps/details?id=it.barbaro.zanzito) and it works apparently well: it gets the image and correctly displays it in the front-end.
But I had to make the changes I'm proposing here: the message was being blocked because the utf-8 decoding failed.
As far as I know, the utf-8 encoding is required for the topic, not for the payload. What I did here was try the utf-8 decoding, but even if unsuccessful, it dispatches the message anyway.
Is there anything else I'm missing?
thanks
Gianluca
* Update __init__.py
* Update __init__.py
* Update __init__.py
* git test - ignore
* Should work
* minor fixes
* updated mqtt/services.yaml
* added two tests, modified threaded subscribe
* removing polymer
* requested changes
* requested changes - minor fix
* security wrap around payload_file_path
* services.yaml updated
* removed file publishing
* minor fix
* Fix#6783, remove a test that makes no sense anymore
* Fix#6784
* Fix typo in docstring
* Fix handling of known->unknown state, extended test, fix lint errors
* Better handling of mismatch in unit of measurement.
Set state to "unkown" and unit of measurement to "ERR" if unit of measurement differs between aggregatet states.
Add entity_id to logged warning.
* Make icon configurable
* Fix typo
* Fix lint
* Fix lint
* Fix lint
* Add option to set entity_id on min_max sensor
* Fix lint logging-not-lazy
* Revert "Add option to set entity_id on min_max sensor"
This reverts commit 4685f26647.
* Revert "Make icon configurable"
This reverts commit fe45aec82d.
* Fixes
* Initial import for HassIO
* Cleanup api code for views
* First unittest for view
* Add test for edit view
* Finish unittest
* fix addons test
* cleanup service.yaml
* Address first round with ping command
* handle timeout dynamic
* fix lint
* Fire EVENT_HOMEASSISTANT_START automations off right away while starting
* Actually have core state be set to 'starting' during boot
* Fix correct start implementation
* Test and deprecate event automation platform on start
* Fix doc strings
* Remove shutting down exception
* More strict when to mark an instance as finished
* Add automation platform to listen for start/shutdown
* When we stop we should wait till it's all done
* Fix testing
* Fix async bugs in tests
* Only set UVLOOP when hass starts from CLI
* This hangs normal asyncio event loop
* Clean up Z-Wave node entity test
* Input Boolean: initial state > restore state
* Input select: initial state overrules restored state
* Input slider: initial state overrule restore state
* Lint
* Lint
* Automation: initial state > restore state
* Clean up code
* Ensure MQTT defaults are used.
* Ensure failed platforms always return None
* Automation: write state to state machine after start
* - Introduced Ring binary_sensor.
- Added unittest for Ring binary_sensor.
- Bumped ring_doorbell 3rd party module.
* Updated requirements
* Added correct file for unittest
* - Introduced Ring binary_sensor.
- Added unittest for Ring binary_sensor.
- Bumped ring_doorbell 3rd party module.
* Updated requirements
* Added correct file for unittest
* Added extra sensors last_ding and last_motion
* Modified Ring binary_sensor and sensor to inherit DOMAIN configuration
* Moved static to top ring.py
* Fixed requirements
* Bump version ring_doorbell to 0.1.2
* testing unittests
* Use hass.data dict instead GLOBALS
* Fixed unittests
* Bump ring_doorbell to 0.1.3
* Updated unittest and coverted to use decorator @requests_mock.Mocker()
* Updated ring_session with lower case
* Add support for group commands (allon/alloff).
Add 'group_aliasses' config attribute that only respond to group commands.
Add nogroup_aliases that only respond to 'on' 'off' commands.
Allow settings device id group behaviour.
* Fix linting.
* Fix lint.
* Adding expire_after to mqtt sensor to expire outdated values
* Extending test case
* mqtt: refactoring expire_after to use timed events instead of polling; lint
* refactor to reset unused trigger
* Fix: handler must be set to None after execution or removal to avoid warning
* Commenting out non-working test
* Fix lint
* Commit to trigger new build
* Commit to trigger new build
* Make testcase work
* Undo unnecessary change
* Remove default value, add extra check
* automatically use bundled certificate if certificate-parameter is set to 'auto' and seperate this from which port is specified
* Fix travis error and long lines
* Update __init__.py
* added support for lights with toggle type
* fixed style errors
* introduced tests for the toggle type
it's not passing yet because of an assertionerror at line 407
* updated to reflect tristate of "state"
* Format code according to pep8
Added line break for import that was too long.
* fixed lint, replaced if statement with 'var = bool(test)'
* changed implementation of state check according to bug on 6bceb04ca1 (r106758784)
* Added support for multiple efergy sensors in the same household.
Also added inital tests for the efergy platform.
* Fixed current_values units.
Changed name to include efergy_ prefix.