* Make async_report_state take agent_user_id
* Attempt to store synced agents
* Drop now not needed initialization
* Make sure cloud uses the all sync on changed preferences
* Some more places to use all version of sync
* Get the agent_user_id from the request context if available
* Minor cleanup
* Remove the old fixed agent_user_id for cloud
Instead pass along cloud_user where appropriate.
* async_delay_save takes a function
* Adjust test for delayed store
* Remove unused save function
* Add login check.
* Updated heatmiserV3 initial commit
* Fixing heatmiser component
* Updated codeowners and heatmiserV3 version
* Updating files as part of PR process
* Removed extra _LOGGER statements.
* Added in HVAC_MODE_OFF to allowed states to track whether heating on/off
* Handling PR comments
* Removed legacy tests
* fixing pylint errors
* Update homeassistant/components/heatmiser/climate.py
Removed .get from config
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/heatmiser/climate.py
Removed .get from config
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Update homeassistant/components/heatmiser/climate.py
Removed .get from config
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Updated climate based on latest feedback
* Removed cast to int and update requirements
* Update requirements
* Updated heatmiser deps
delete incorrect 'mdi:brightness-3' in final
```
def icon(self):
"""Icon to use in the frontend, if any."""
return MOON_ICONS.get(self.state, "mdi:brightness-3")
```
which still shows in the sensors attributes
* Added check for "name" channelMetada attribute
* Added/changed smart home media player tests for added value name in chanelMetadata payload section
* Since Alexa only expects a number/callSign/affiliate in the returned response, returning "name" is not technically valid. Modified to return the value in the callSign field instead since it's a text value. Since there is no returned channel number, cannot return a true numeric value in "channel" field
* Improve Alexa interface selection for binary sensors
This allows the sensor to work correctly as a contact or motion sensor
in alexa, if the user overrides its display category as such.
* add tests
* Add broadlink remote control platform
* Fix order of the imports
* Add remote.py to .coveragerc
* Optimize MAC address validation
* Use storage helper class and improve code readability
* Add me to the manifest as a code owner
* Fix dosctring
* Add me to the code owners
* Remove storage schemas, rename storage keys and improve readability
* move service constants to const.py, move all custom xiaomi_miio services to xiaomi_miio domain
* update service names
* try to fix black error
* try black formatting again
* final black formatting attempt
* update service names to reflect platform
* fix typo
* Clear state on exception
Clear state if querying the device fails. The state is then set to unknown, so it can be tracked if a miflora device isn't responding any more.
* Add available()
Signal valid data via available()
* Add ATEN PE component for ATEN eco PDUs
* aten_pe: Require host configuration
* aten_pe: Do not import from other integrations
* aten_pe: Include unnamed outlets
* aten_pe: Avoid get() for config entries having default values
* aten_pe: Fix documentation URI
* aten_pe: Remove unused return value
* aten_pe: Update atenpdu lib to 0.2.0 for asyncio
* aten_pe: Raise exception if initialization fails
* aten_pe: Update atenpdu lib to 0.3.0 for improved exception handling
* Add Huawei LTE binary sensor support, mobile connection sensor
* Improve mobile connection sensor icon docstring
* Remove device class for permission to use a more descriptive icon
* Added device trigger to alarm control panel
* Added supported features to check that device has certain trigger
* Fixed tests for device_trigger
* Fixed pylint error
* Removed pending trigger and removed trigger condition
* Resolve hosts for fritzbox_callmonitor
If the configuration supplied "host" is not an IP address, try resolving it
* always use gethostbyname
Instead of just checking whether it is an IP and if it isn't try to resolve; just resolve it; IPs will be returned unchanged, and hostnames will be resolved.
* Catch error if the hostname cannot be resolved
* Don't fallback to default host
If the hostname cannot be resolved; don't try to fallback; just print the error message.
* Fail setup if hostname cannot be resolved
If the hostname cannot be resolved, log an error and stop the setup;
no entities will be then created.
* Added DSMR Reader platform
- Added DSMR Reader platform
- Updated codeowners for other components I added earlier
* Move sensor definitions to new file
* Sensor definitions in new file
* Add energy prices from MQTT
* lint fixes
* Black formatted some files
* Update .coveragerc
* Support transform methods on definitions
* Manifest mangled by Black, fixed
* Visual studio code reformatting dictionary error
* Fix issues with code, remove unrelated manifest changes
* Update CODEOWNERS
* Only create cloud user if cloud in use
* Pass context to alexa
* Update requirements
* Fix handing & design pattern for 0.30
* fix tests
* Fix lint & tests
* rename internal user
* update demo service domain and service description
* move DOMAIN and service name to const.py
* update per balloob's service name suggestion
* update service name in services.yaml
* update service name constant's name
* Adding lutron_caseta fan controller. Updated to pylutron 0.5.1
* Accidental import remain
* updating for black formatting
* Fix blank spaces
* Moving third party import
* update to 0.5.1 to pass checks
* fix deletion of new line
* Update fan.py
* Update with dev branch, update from comments, added mediumhigh
Instead of using the roku.power method, which toggles power,
implement the media_player.turn_on command for the roku component
by calling the new roku.poweron method.
Fixes#28961, but depends on upstream
https://github.com/jcarbaugh/python-roku/pull/53
* Add opentherm_gw device support
* Add support for enabling/disabling of opentherm_gw entities
* Disable sensors by default, base climate entity_id on gw_id instead of friendly_name to guarantee uniqueness
* Remove platform name from unique_id
Since 2019.1 has launched there is a perfectly reasonable (in fact the standard) case where ios component is loaded (i.e. actionable notifications) but no devices are registed for the now defunct `ios.notify` service. As such, the log warning relating to this case is no longer relevant.
* Upgrade upcloud-api to 0.4.5
* Fix UpCloud name spelling in manifest
* Update data at setup time for better initial states
* Clean up signal handlers on remove
* Signal data update on server start
To keep related binary sensor better up to date.
* Improve track_time_interval emulation for initial update
* Move request sync logic into GoogleConfig
* Return http status code for request_sync same as cloud
* agent_user_id is not optional for async_sync_entities now
* No need in checking parameter here
* Adjust some things for cloud tests
* Adjust some more stuff for cloud tests
* Drop uneccessary else
* Black required change
* Let async_schedule_google_sync take agent_user_id
* Assert return value on api call
* Test old api key method
* Update homeassistant/components/google_assistant/helpers.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Make rest sensor a little bit more flexible and allow the response to be a list with 0th element being a dictionary
* Black formatter wanted a different formatting
* Added test case for a list response with dict as 0th element
* Fixed lint error - it thinks a + STRING is an avoidance of using % sequences for log messages; I generally prefer explicit + rather than string juxtaposition for combining string literals, but sounds like that's not the standard
* Fixed test case -- I added it to the wrong scenario and need to use the one with json_attrs.
Although I originally contributed this component, I no longer use it myself and haven't been following the internal development of HA, so I'm no longer a good person to review any further changes to this component. I would therefore like to relinquish my CODEOWNER status over this component.
* Added Post Processing Jobs to NZBGet component
In the current implementation of the NZBGet component there is no way of
knowing whether NZBGet is still in the Post Processing phase of a download
job. This can be very useful information. For instance when you want to
suspend the NZBGet service when all queue items have been completed.
This change adds that additional sensor.
* Renamed Count to Jobs in NZBGet component
* change fromkeys to dict comprehension to prevent append working on a list by reference. Now each entity id has its own seperate list
* change fromkeys to dict comprehension to prevent append working on a list by reference. Now each entity id has its own seperate list
* use get instead of direct keys for dict
* change fromkeys to dict comprehension to prevent append working on a list by reference. Now each entity id has its own seperate list
* use get instead of direct keys for dict
* changed get back to []
* move service constants to const.py, update blackbird custom service domain
* Readd bluesound services.yaml entries since it should be part of a different branch
* update service domain for local_file from camera to local_file
* remove service.yaml entry in camera component as part of change
* fix test
* move constants to const.py
* add local_file/const.py to .coveragerc
* remove local_file/const.py from .coveragerc since component has tests
* add model and serial to caseta devices
* use just serial for unique id
* add display name for entity registry
* remove caseta device model
* just store device
* state and device are the same
* Update WazeRouteCalculator to 0.11
* Update WazeRouteCalculator to 0.11
* Adding new config options to Waze
* Fixing avoid subscription option
* Update WazeRouteCalculator to 0.12
There was an error in the underlying lib
* Update WazeRouteCalculator to 0.12
* Fix digest auth rest sensors
* Refactor to use request()
* Fix black complaints
* Don't rename data variable
Don't rename the data variable, appears several other sensors have been coded to rely on it
* Fix tests
test_setup_missing_schema:
Change the exception to check for to PlatformNotReady. With the change away from prepared statements, we no longer get the MissingSchema error during setup - we get it when we attempt to call the endpoint. Since the result is PlatformNotReady, which is what we want, and the error log clearly contains a note that the schema is incorrect I think this is fine.
test_setup_failed_connect & test_setup_timeout:
These aren't checking for minimum config, and they're not invoking the correct method to have the default config filled in. Therefore I've just added the correct minimum config so these can continue to test what they're there to test.
test_update_request_exception:
Testing a request exception with the assert on line 404! Excellent. Anyway, we've moved from using the requests Session object to the requests.request function - so the patch needed to be altered to ensure the RequestException was raised.
* Remove no longer needed import
* Fix binary sensor test in same way
* Explicitly include Alexa Interface to discovery response.
* Updated cloud component test to reflect additional Alexa interface.
* Updated test for recently added SeekController.
* Make sure to cast the volume_level of a universal media_player to a float
* Fix test that expects the wrong bahaviour
* Catch exception instead of checking for None
* Fix Onvif setup error with a premature end of connection on GetStreamUri wsdl call
Reconnect to onvif camera after getting profiles to fix this error :
[homeassistant.components.onvif.camera] Retrieving stream uri
[zeep.asyncio.transport] HTTP Post to http://192.168.1.15/onvif/Media:
b'<?xml version=\'1.0\' encoding=\'utf-8\'?>\n<soap-env:Envelope xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope"><soap-env:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecur
2019-09-20 01:08:51 ERROR (MainThread) [homeassistant.components.camera] Error while setting up platform onvif
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 553, in write_bytes
await self.body.write(writer)
File "/usr/local/lib/python3.7/site-packages/aiohttp/payload.py", line 231, in write
await writer.write(self._value)
File "/usr/local/lib/python3.7/site-packages/aiohttp/http_writer.py", line 101, in write
self._write(chunk)
File "/usr/local/lib/python3.7/site-packages/aiohttp/http_writer.py", line 67, in _write
raise ConnectionResetError('Cannot write to closing transport')
ConnectionResetError: Cannot write to closing transport
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 110, in async_setup_platform
await hass_camera.async_initialize()
File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 168, in async_initialize
await self.async_obtain_input_uri()
File "/usr/src/homeassistant/homeassistant/components/onvif/camera.py", line 266, in async_obtain_input_uri
stream_uri = await media_service.GetStreamUri(req)
File "/usr/local/lib/python3.7/site-packages/zeep/asyncio/bindings.py", line 13, in send
options["address"], envelope, http_headers
File "/usr/local/lib/python3.7/site-packages/zeep/asyncio/transport.py", line 107, in post_xml
response = await self.post(address, message, headers)
File "/usr/local/lib/python3.7/site-packages/zeep/asyncio/transport.py", line 95, in post
proxy=self.proxy,
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 497, in _request
await resp.start(conn)
File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 844, in start
message, payload = await self._protocol.read() # type: ignore # noqa
File "/usr/local/lib/python3.7/site-packages/aiohttp/streams.py", line 588, in read
await self._waiter
aiohttp.client_exceptions.ClientOSError: [Errno None] Can not write request body for http://192.168.1.15/onvif/Media
* Add code comment
* Update camera.py
* Lint.
* Improve z-wave thermostat support
Discover thermostat using COMMAND_CLASS_THERMOSTAT_MODE
so that it is a single entitiy in case there are multiple
setpoints. z-wave docs mention it is always present.
Add support for single/range target temperature depending
on the current thermostat mode.
* Remove debug print
* Refactor Z-Wave dynamic setpoint(s) selection
- use explicit mapping between modes and setpoints as defined in
Z-Wave specs
- add tests for away (2 setpoints) and heat eco (1 setpoint) modes
* Add non-standard thermostat mode aliases
* Added availability_template to Template Cover platform
* Added availability_template to Template Binary Sensor platform
* Added availability_template to Template Fan platform
* Added availability_template to Template Light platform
* Added availability_template to Template Sensor platform
* Added availability_template to Template Switch platform
* Added availability_template to Template Vacuum platform
* Added availability_template to Template Lock platform
* Added to test for invalid values in availability_template
* Black and Lint fix
* black formatting
* Added to test for invalid values in availability_template
* black
* Added to test for invalid values in availability_template
* Added to test for invalid values in availability_template
* simplified exception handler
* Fixed Entity discovery big and coverage
* Added to test for invalid values in availability_template
* flake8
* fixed component ID in test
* Added to test for invalid values in availability_template
* Added to test for invalid values in availability_template
* Made availability_template redering erorr more concise
* Cleaned template setup
* I'll remember to run black every time one of these days...
* Refactored Template initialisation
* Refactored Template initialisation
* Updated AVAILABILITY_TEMPLATE Rendering error
* Updated AVAILABILITY_TEMPLATE Rendering error
* Updated AVAILABILITY_TEMPLATE Rendering error
* Updated AVAILABILITY_TEMPLATE Rendering error
* Updated AVAILABILITY_TEMPLATE Rendering error
* Updated AVAILABILITY_TEMPLATE Rendering error
* Updated AVAILABILITY_TEMPLATE Rendering error
* Updated AVAILABILITY_TEMPLATE Rendering error
* Moved const to package Const.py
* Moved const to package Const.py
* Moved const to package Const.py
* Moved const to package Const.py
* Moved const to package Const.py
* Moved const to package Const.py
* Moved const to package Const.py
* Moved const to package Const.py
* Fix import order (pylint)
* Fix import order (pylint)
* Fix import order (pylint)
* Fix import order (pylint)
* Fix import order (pylint)
* Fix import order (pylint)
* Fix import order (pylint)
* Fixed linting issues
* Moved availability_template rendering to common loop
* Moved availability_template rendering to common loop
* Moved availability_template rendering to common loop
* Moved availability_template rendering to common loop
* Removed 'Magic' string
* Removed 'Magic' string and removed duplicate code
* Removed 'Magic' string
* Removed 'Magic' string
* Brought contant into line
* Refactored availability_tempalte rendering to common loop
* Removed 'Magic' string
* Cleaned up const and compare lowercase result to 'true'
* Cleaned up const and compare lowercase result to 'true'
* Cleaned up const and compare lowercase result to 'true'
* Cleaned up const and compare lowercase result to 'true'
* Cleaned up const and compare lowercase result to 'true'
* Cleaned up const and compare lowercase result to 'true'
* Cleaned up const and compare lowercase result to 'true'
* reverted _available back to boolean
* reverted _available back to boolean
* reverted _available back to boolean
* reverted _available back to boolean
* reverted _available back to boolean
* reverted _available back to boolean
* reverted _available back to boolean
* Fixed tests (magic values and state checks)
* Fixed tests (magic values and state checks)
* Fixed tests (async, magic values and state checks)
* Fixed tests (async, magic values and state checks)
* Fixed tests (async, magic values and state checks)
* Fixed tests (async, magic values and state checks)
* Fixed tests (async, magic values and state checks)
* Removed duplicate
* Clean up and remove debug
* Reverted Dev Container Change
* Add supported_features to Alarm Control Panel
* mark supported_features abstract
* Add SF to async_register_entity_service
* fix test
* Add missing SF SUPPORT_ALARM_ARM_CUSTOM_BYPASS
* isort
* fix async_register_entity_service
* Update alarm_control_panel.py
* Added Alexa.ModeController to cover entities.
* Added synonyms for directives.
* Updated tests for additional synonyms for directives.
* Added Alexa.ModeController to cover entities.
* Sacrifice unused variable in split() to please the Pylint gods.
* Removed duplicate instance check.
* Corrected variable name, clarified definition and consistency.
* Changed list to tuple.