Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add media_player.dlna_dmr component #14749

Merged
merged 55 commits into from Aug 5, 2018

Conversation

@StevenLooman
Copy link
Contributor

commented Jun 1, 2018

Description:

Related issue (if applicable): -

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#5474

Example entry for configuration.yaml (if applicable):

media_player:
  - platform: dlna_dmr
    url: http://192.168.178.10:49152/description.xml

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

For discovery, see home-assistant/netdisco#196

@StevenLooman

This comment has been minimized.

Copy link
Contributor Author

commented Jun 1, 2018

The version of netdisco needs to be updated as well, but this depends on a new release of it.

Extra tasks:

  • Release new version of netdisco (1.5.0 was released)
  • Change dicovery component netdisco version requirement
@StevenLooman

This comment has been minimized.

Copy link
Contributor Author

commented Jun 4, 2018

Lets add some documentation with regard to some design decisions and implementation details. It might make a review a bit easier, as the module got bigger than expected.

The decorators requires_action (line 71) and requires_state_variable (line 110) are used later on, to ensure methods like DlnaDmrDevice.async_set_volume_level() have the services with actions.

The advantage is that if service/action is available, the action is passed on to the method and can be used. No need to look it up in each method. If it is not available, handling (i.e., raising NotImplemented) is done automatically.
The disadvantage is that it adds more code, likely harder to maintain. The DLNA standard requires the RenderingControl service to be implemented (thus, these checks could be omitted, in theory), but the AVTransport service is optional.
I am unsure if DlnaDmrDevice.supported_features() does report not being able to pause the device, the service/method itself will never be called (i.e., if Home Assistant blocks this call.) If so, we should be able to remove the decorators and make the module little bit smaller/simpler.

The UpnpNotifyView is there to receive notifications from the device. For example, if you turn up the volume, the device can report this change.
Notice that some devices play less nice (such as the upmpdcli) which send updates before the initial 'registration' request (done in DlnaDmrDevice._async_init_device() is completed. In other words, the used SID (unique identifier shared between the client/device, generated by the device) is not known when we already receive a callback. As a work-around, a small backlog (see UpnpNotifyView._backlog) was added.

Finally, some devices, such as my Samsung TV, is rather picky about the source it wants to play from. Since play_media is implemented (DlnaDmrDevice.async_play_media()), the TTS service pops up. It is expected that users will want to use this, or at least test it. If the TTS service is used, it calls play_media with a parameter containing the URL to the TTS-file. Also, others have already tried to play media served via Home Assistant. Without the PickyDeviceProxyView, my TV refuses to play it, reporting an error. This view adds some headers and functionality (Accept-Ranges and some DLNA specific headers), such that more picky devices can play media as well served by Home Assistant.

Feel free to suggest changes. In hindsight, it might be better to remove the checks around method which use he DLNA RenderingControl service (volume setting/muting.)

@dgomes
Copy link
Contributor

left a comment

This is indeed a very large PR, but a welcome one :)

I've only gone through the code very fast, but leave you already some items to address.

add_devices([device])


@asyncio.coroutine

This comment has been minimized.

Copy link
@dgomes

dgomes Jun 7, 2018

Contributor

We have adopted PEP 492, please update accordingly, eg:

@asyncio.coroutine
def function():`

to

async def function

yield from becomes await

This comment has been minimized.

Copy link
@StevenLooman

StevenLooman Jun 9, 2018

Author Contributor

Will do.

return supported_features

@property
@requires_state_variable('RC', 'Volume')

This comment has been minimized.

Copy link
@dgomes

dgomes Jun 7, 2018

Contributor

Properties must not execute any IO

All property values must be populated in async_update(), if I understand correctly requires_state_variable will trigger some UPnP message exchange

This comment has been minimized.

Copy link
@StevenLooman

StevenLooman Jun 9, 2018

Author Contributor

This does not do any IO. In DlnaDmrDevice._async_init_device() the specification of the device is parsed. Via the NotifyView the any values for state variables are stored. These methods simply read whats already stored.

PickyDeviceProxyView.DLNA_CONTENT_FEATURES.replace('17',
'00')

meta_data = """

This comment has been minimized.

Copy link
@dgomes

dgomes Jun 7, 2018

Contributor

Lets keep this XML string as constants defined at the beginning of the file

self.schedule_update_ha_state()

@property
def supported_features(self):

This comment has been minimized.

Copy link
@dgomes
del self._registered_services[sid]


class PickyDeviceProxyView(HomeAssistantView):

This comment has been minimized.

Copy link
@dgomes

dgomes Jun 7, 2018

Contributor

I understand the "PickyDevice" issue, but we should be able to hide this issue from HomeAssistant and move its handling to the supporting library.

I understand that it is no easy task, but today it's Samsung, tomorrow some 10 other different brands, each picky on something different.

This comment has been minimized.

Copy link
@StevenLooman

StevenLooman Jun 9, 2018

Author Contributor

Fair enough, I'll remove it.

But, people will try to use TTS services and report their devices not playing.
Not sure how to move this to another library. This requires starting a new webserver, mixing it with home assistants event loop, if possible? Is there a way to disable the TTS service for a specific device, from within the component?


cfg_extra = {
CONF_MAX_VOLUME: config.get(CONF_MAX_VOLUME),
CONF_PICKY_DEVICE: config.get(CONF_PICKY_DEVICE) or is_picky,

This comment has been minimized.

Copy link
@dgomes

dgomes Jun 7, 2018

Contributor

config.get(CONF_PICKY_DEVICE, is_picky)

@ghost ghost added the in progress label Jun 9, 2018

StevenLooman added some commits Jun 9, 2018

@StevenLooman

This comment has been minimized.

Copy link
Contributor Author

commented Jun 10, 2018

I have changed things according to your feedback.

One question though, about supported_features. The volume/mute control are mandatory according to the DLNA standard. But play/pause/stop/next/previous/play_media are optional. Should the device set supported_features accordingly, during initialization, such as the Open Home component? Or always report the features and error upon usage?

@dgomes

This comment has been minimized.

Copy link
Contributor

commented Jun 10, 2018

supported_features has an impact in the frontend, thats one of the reasons to exposed in initialisation everything it might support in the "future".

In my understanding of the architecture discussion, I would say that optional should be part of supported_features.

But someone else will necessarily come in and do a 2nd review and can comment on this view :)

@@ -190,7 +190,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):

if config.get(CONF_URL) is not None:
url = config.get(CONF_URL)
name = config.get(CONF_NAME)
name = config.get(CONF_NAME, DEFAULT_NAME)

This comment has been minimized.

Copy link
@dgomes

dgomes Jun 10, 2018

Contributor

No need to pass DEFAULT_NAME, voluptuous will have already set it to DEFAULT_NAME

StevenLooman added some commits Jun 10, 2018

@dgomes

dgomes approved these changes Jun 11, 2018

@StevenLooman

This comment has been minimized.

Copy link
Contributor Author

commented Jun 11, 2018

@StevenLooman StevenLooman referenced this pull request Jun 16, 2018

Merged

Add dlna_dmr component #5474

2 of 2 tasks complete
@rytilahti

This comment has been minimized.

Copy link
Contributor

commented Jun 21, 2018

As a side note, should this be added to handle the DLNA from netdisco (components/discovery.py)?

unknown service discovered: DLNA {'host': '192.168.XX.XX', 'port': 9999, 'ssdp_description': 'http://192.168.XX.XX:9999/XXXXXXXX/Upnp/device.xml', 'name': '小米互联网XXXX', 'model_name': 'S602', 'model_number': 'S602', 'serial': None, 'manufacturer': 'Mi, Inc.', 'udn': 'uuid:XXXXXX'}
@rytilahti
Copy link
Contributor

left a comment

Some misc comments, I think the protocol level handling should be done in an external library instead of here. Basic functionality tested briefly to work.

@property
def unique_id(self) -> str:
"""Return an unique ID."""
return "{}.{}".format(__name__, self._url)

This comment has been minimized.

Copy link
@rytilahti

rytilahti Jun 22, 2018

Contributor

self._url is not a good idea here, as it contains the IP address making it dependent on the active network setup. It's better to use the netdiscovered uuid, uuid from the description file, or None if not available (although there should be uuid defined in the description).

This comment has been minimized.

Copy link
@StevenLooman

StevenLooman Jun 26, 2018

Author Contributor

This bugged me before and I'm glad you brought it up. The UUID is not known during the initial lifetime of the component. I.e., the component is initialized and on the first update the description file is parsed and the UUID becomes known.

Thus, the component might change unique_ids during its lifetime from None to a value. Is this acceptable for Home Assistant?

When the device is found via discovery, the same holds. Once the description file is parsed, the component knows the UUID.

This comment has been minimized.

Copy link
@rytilahti

rytilahti Jun 26, 2018

Contributor

I'm not sure if it's okay to change the UUID after the initialization, as I think it will just get asked once during/after the setup phase. For non-discovered devices you could setup the device first after its service description is parsed, for discovered devices it is much simpler (as netdisco already parses the file during the discovery, and it could thus pass it onwards if not done already).

import logging
import re
import urllib.parse
import xml.etree.ElementTree as ET

This comment has been minimized.

Copy link
@rytilahti

rytilahti Jun 22, 2018

Contributor

I suppose the xml parsing should be happening in the backend library.


DEPENDENCIES = ['http']

DEFAULT_NAME = 'DLNA_DMR'

This comment has been minimized.

Copy link
@rytilahti

rytilahti Jun 22, 2018

Contributor

Would 'DLNA media player' fit better here?

This comment has been minimized.

Copy link
@StevenLooman

StevenLooman Jun 23, 2018

Author Contributor

DMR stands for 'Digital Media Renderer'. Should we use this?

Also, should the file itself also be renamed?

This comment has been minimized.

Copy link
@rytilahti

rytilahti Jun 23, 2018

Contributor

I suppose that is fine too. Wrt naming of the file, I think it's fine to use abbreviations.

<upnp:class>{upnp_class}</upnp:class>
<res protocolInfo="http-get:*:{mime_type}:{dlna_features}">{media_url}</res>
</item>
</DIDL-Lite>"""

This comment has been minimized.

Copy link
@rytilahti

rytilahti Jun 22, 2018

Contributor

I think all the above would fit better into the backend library.

This comment has been minimized.

Copy link
@StevenLooman

StevenLooman Jun 23, 2018

Author Contributor

While I agree, 'the' backend library is specifically for UPnP. DLNA is a standard on top of UPnP. DIDL is another standard, used by DLNA. Unfortunatly, I couldn't find any Python DIDL packages on PyPI. Moving this to the UPnP library would introduce things not related to UPnP itself.

I'll try to come up with a solution.

This comment has been minimized.

Copy link
@dgomes

dgomes Jun 23, 2018

Contributor

I think the answer is that a python-didl package is necessary :)

This comment has been minimized.

Copy link
@rytilahti

rytilahti Jun 23, 2018

Contributor

Is a pure UPnP library useful nowadays without supporting DLNA specific interfaces? I'm living under the impression that it's nowadays pretty much just DLNA (in which case I would include DLNA specifics to the same library).

This comment has been minimized.

Copy link
@dgomes

dgomes Jun 23, 2018

Contributor

Quite... and HA is currently using several other upnp libraries without DLNA support. (would be interesting to fold all UPnP uses into a single upnp library)

This comment has been minimized.

Copy link
@StevenLooman

StevenLooman Jun 24, 2018

Author Contributor

Perhaps netdisco should get a review then as well. Currently it targets DLNA, but not 'generic' UPnP devices. Lots of routers talk UPnP as well, for example.

This comment has been minimized.

Copy link
@rytilahti

rytilahti Jun 25, 2018

Contributor

SoCo has a python implementation fo DIDL, unfortunately no idea how complete it is, but it may be worth looking into: https://github.com/SoCo/SoCo/blob/master/soco/data_structures.py

@StevenLooman looks like the DLNA check uses 'urn:schemas-upnp-org:device:MediaServer:1', which is actually wrong for this PR :-)

This comment has been minimized.

Copy link
@StevenLooman

StevenLooman Jun 29, 2018

Author Contributor

Thank you for the pointer. I've seen the SoCo-implementation, but it is incomplete (only the parts required for SoCo are there.) I've built python-didl-lite and will be using this.

This comment has been minimized.

Copy link
@StevenLooman

StevenLooman Jun 29, 2018

Author Contributor

@rytilahti What you mean with:

@StevenLooman looks like the DLNA check uses 'urn:schemas-upnp-org:device:MediaServer:1', which is actually wrong for this PR :-)

This comment has been minimized.

Copy link
@rytilahti

rytilahti Jun 30, 2018

Contributor

Ok, great, I think I may have a use for that library elsewhere 👍

What I meant is that netdisco checks for MediaServer too: https://github.com/home-assistant/netdisco/blob/master/netdisco/discoverables/DLNA.py - somehow I missed that it has DNR too there, so I think that should be fine anway.

@StevenLooman

This comment has been minimized.

Copy link
Contributor Author

commented Jun 23, 2018

@rytilahti Thank you for the review. I'll change things accordingly.

@rytilahti

This comment has been minimized.

Copy link
Contributor

commented Jun 23, 2018

You may also want to capture the exceptions raised by the library:

Jun 23 15:57:00 nuc hass[28733]: 2018-06-23 15:57:00 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall media_player.media_play_pause: entity_id=['media_player.dlna_dmr_2']>
Jun 23 15:57:00 nuc hass[28733]: Traceback (most recent call last):
Jun 23 15:57:00 nuc hass[28733]:   File "/home/hass/home-assistant/homeassistant/core.py", line 1007, in _event_to_service_call
Jun 23 15:57:00 nuc hass[28733]:     await service_handler.func(service_call)
Jun 23 15:57:00 nuc hass[28733]:   File "/home/hass/home-assistant/homeassistant/components/media_player/__init__.py", line 441, in async_service_handler
Jun 23 15:57:00 nuc hass[28733]:     await getattr(player, method['method'])(**params)
Jun 23 15:57:00 nuc hass[28733]:   File "/home/hass/home-assistant/homeassistant/components/media_player/dlna_dmr.py", line 531, in async_media_play
Jun 23 15:57:00 nuc hass[28733]:     await action.async_call(InstanceID=0, Speed='1')
Jun 23 15:57:00 nuc hass[28733]:   File "/home/hass/home-assistant/libs/async_upnp_client/async_upnp_client/async_upnp_client.py", line 411, in async_call
Jun 23 15:57:00 nuc hass[28733]:     raise UpnpError('Error during async_call(), status: %s, body: %s' % (status_code, response_body))
Jun 23 15:57:00 nuc hass[28733]: async_upnp_client.async_upnp_client.UpnpError: Error during async_call(), status: 500, body: <?xml version="1.0"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring>UPnPError</faultstring><detail><UPnPError xmlns="urn:schemas-upnp-org:control-1-0"><errorCode>701</errorCode><errorDescription>Action Play failed
@StevenLooman

This comment has been minimized.

Copy link
Contributor Author

commented Jul 25, 2018

Interesting, my own run didn't find these. Now fixed.

@StevenLooman

This comment has been minimized.

Copy link
Contributor Author

commented Jul 29, 2018

@MartinHjelmare

This comment has been minimized.

Copy link
Member

commented Jul 29, 2018

I want a member that's familiar with aiohttp servers to review.

@MartinHjelmare
Copy link
Member

left a comment

If we fix the remaining things I think we can merge.

from datetime import datetime

import aiohttp
import aiohttp.web

This comment has been minimized.

Copy link
@MartinHjelmare

MartinHjelmare Aug 5, 2018

Member

This isn't used anymore.

return call_wrapper


def determine_listen_ip(config):

This comment has been minimized.

Copy link
@MartinHjelmare

MartinHjelmare Aug 5, 2018

Member

This function seems overkill now. Just inline the default lookup of server host.

try:
upnp_device = await factory.async_create_device(url)
except (asyncio.TimeoutError, aiohttp.ClientError):
_LOGGER.debug('PlatformNotReady')

This comment has been minimized.

Copy link
@MartinHjelmare

MartinHjelmare Aug 5, 2018

Member

This can be removed. Raising PlatformNotReady will log a warning.

self._async_on_hass_stop)

@property
def udn(self):

This comment has been minimized.

Copy link
@MartinHjelmare

MartinHjelmare Aug 5, 2018

Member

This seems not needed. We can use self._device.udn directly in unique_id property.


_LOGGER = logging.getLogger(__name__)

ASYNC_LOCK = asyncio.Lock()

This comment has been minimized.

Copy link
@MartinHjelmare

MartinHjelmare Aug 5, 2018

Member

Store the lock in hass.data.

'async-upnp-client==0.12.2',
]

DEPENDENCIES = []

This comment has been minimized.

Copy link
@MartinHjelmare

MartinHjelmare Aug 5, 2018

Member

Remove this.

StevenLooman added some commits Aug 5, 2018

@MartinHjelmare
Copy link
Member

left a comment

Great! Can be merged when build passes.

@StevenLooman

This comment has been minimized.

Copy link
Contributor Author

commented Aug 5, 2018

Thanks! This should do it...

@MartinHjelmare MartinHjelmare merged commit b152bec into home-assistant:dev Aug 5, 2018

5 checks passed

Hound No violations found. Woof!
WIP ready for review
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 93.824%
Details

@ghost ghost removed the in progress label Aug 5, 2018

@rytilahti

This comment has been minimized.

Copy link
Contributor

commented Aug 5, 2018

🎉 nice work @StevenLooman and congrats for the merge! :-) I'll give it a try when I have some free time next week and will file bugs if necessary.

MizterB added a commit to MizterB/home-assistant that referenced this pull request Aug 11, 2018

Add media_player.dlna_dmr component (home-assistant#14749)
* Add media_player.dlna_dmr component

* PEP 492

* Move DIDL-template up

* Remove max_volume-override option

* Remove picky_device support

* Use DEFAULT_NAME

* Make supported_features static

* Remove unneeded argument

* Proper module-docstring

* Add http dependency

* Remove additional_configuration options, no longer used

* Change default name to 'DLNA Digital Media Renderer'

* Use python-didl-lite for DIDL-Lite-xml construction/parsing

* Handle NOT_IMPLEMENTED for UPnP state variables RelativeTimePosition and CurrentMediaDuration

* Use UPnP-UDN for unique_id

* Proper handling of upnp events

* Keeping flake8 happy

* Update requirements_all.txt

* Make UDN optional

* Ensure NotifyView is started, before using it

* Only subscribe to services we're interested in

* Don't update state_variables if value has not been changed + minor refactoring

* Improve play_media, follow flow of DLNA more closely

* Hopefully fix ClientOSError problems

* Flake8 fixes

* Keep pylint happy

* Catch errors and report gracefully

* Update async_upnp_client to 0.11.0

* Don't be so noisy

* Define/use constants for HTTP status codes

* Add discovery entry for dlna_dmr

* More robustness with regard to state variable not being set (yet)

* Keep privates hidden

* Handle NOT_IMPLEMENTED for CurrentTrackMetaData state variable

* Fixes in async_upnp_client + renew UPnP subscriptions regularly

* Not too eager

* Refactor duplicate code to _current_transport_actions and improve parsing of actions

* Support RC:1 to RC:3 and AVT:1 to AVT:3

* Moved DLNA-specifics to async_upnp_client.dlna.DmrDevice

* Use our own HTTP server to listen for events.

* More clear and explicit log message for easier troubleshooting

* Follow changes by hass, fixes traceback

* Fix not being able to do next

* Changes after review by @MartinHjelmare

* Linting

* Use homeassistant.util.get_local_ip

* Moved upnp event handling to async_upnp_client

* Keeping pylint happy

* Changes after review by @MartinHjelmare

@balloob balloob referenced this pull request Aug 17, 2018

Merged

0.76.0 #16027

austinlg96 added a commit to austinlg96/home-assistant that referenced this pull request Aug 28, 2018

Syncing Fork (#1)
* More pylint 2 fixes (home-assistant#15565)

## Description:

More fixes flagged by pylint 2 that don't hurt to have before the actual pylint 2 upgrade (which I'll submit soon).

## Checklist:
  - [ ] The code change is tested and works locally.
  - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass**

* Add Tuya fan support (home-assistant#15525)

* Add Tuya fan platform

* Add Tuya fan platform

* fix as review required

* Reset failed login attempts counter when login success (home-assistant#15564)

* Update the frontend to 20180720.0

* Update the frontend to 20180720.0

* Allow auth providers to influence is_active (home-assistant#15557)

* Allow auth providers to influence is_active

* Fix auth script test

* Upgrade pymysensors to 0.16.0 (home-assistant#15554)

* Remove relative time from state machine (home-assistant#15560)

* Reset failed login attempts counter when login success (home-assistant#15564)

* Bumped version to 0.74.0

* light.tplink: initialize min & max mireds only once, avoid i/o outside update (home-assistant#15571)

* light.tplink: initialize min & max mireds only once, avoid i/o outside update

* revert the index change

* fix indent, sorry for overwriting your fix, balloob

* light.tplink: initialize min & max mireds only once, avoid i/o outside update (home-assistant#15571)

* light.tplink: initialize min & max mireds only once, avoid i/o outside update

* revert the index change

* fix indent, sorry for overwriting your fix, balloob

* fix aiohttp InvalidURL exception when fetching media player image (home-assistant#15572)

* fix aiohttp InvalidURL exception when fetching media player image

The first call for the HA proxy (`/api/media_player_proxy/media_player.kodi?token=...&cache=...`)
is receiving relative urls that are failing, this is a simple fix to precede the base_url when hostname is None.

* fix import location and sort stdlib imports

* Allow MQTT Switch to have an optional state configuration (home-assistant#15430)

Switches by default use the payload_on and payload_off configuration parameters to specify both the payload the switch should send for a state but also what will be returned for the current state - which isnt always the same
As a toggle switch might always send an ON or TOGGLE to toggle the switch, but still receive an ON or an OFF for the state topic - This change allows for splitting them apart

* Add unique_id to netgear_lte sensors (home-assistant#15584)

* Add relay addr & chan config to alarmdecoder zones (home-assistant#15242)

Add relay addr & chan config to alarmdecoder zones

* Update pyhomematic, fixes home-assistant#15054, home-assistant#15190 (home-assistant#15603)

* Throttle unavailability warnings for tplink light/switch (home-assistant#15591)

* Frontend component should auto load auth coomponent (home-assistant#15606)

* Bugfix HomeKit name and serial_number (home-assistant#15600)

* Bugfix HomeKit name and serial_number

* Revert serial_number changes

* Remove entity picture of Tuya entity (home-assistant#15611)

* Upgrade mypy to 0.620 (home-assistant#15612)

* Pylint cleanups (home-assistant#15626)

* Pylint 2 no-else-return fixes

* Remove unneeded abstract-class-not-used pylint disable

* Add typing to homeassistant/*.py and homeassistant/util/ (home-assistant#15569)

* Add typing to homeassistant/*.py and homeassistant/util/

* Fix wrong merge

* Restore iterable in OrderedSet

* Fix tests

* Use case insensitive comparison for Sonos model check (home-assistant#15604)

* Refresh Sonos source list on changes (home-assistant#15605)

* The tense is wrong (home-assistant#15614)

Instead of spent, we should be using spend :)

* Suppress error between 00:00 and 01:00 (home-assistant#15555)

* Suppress error between 00:00 and 01:00

Suppress an error that often occers between 00:00 and 01:00 CE(S)T during that time, probably because buienradar.nl is then updating its forcast for the next day. The API does not always work between these times (in the middle of the night).

* white space & import

* unnecessary brackets

* Use async_create_task (home-assistant#15633)

* Use async_create_task

* Fix test

* Allow system users to refresh tokens (home-assistant#15574)

* WIP: Hass.io sent token to supervisor (home-assistant#15536)

Hass.io sent token to supervisor

* Fix aiohttp connection reset errors (home-assistant#15577)

* Fix aiohttp connection reset errors

* Update aiohttp_client.py

* Update aiohttp_client.py

* Update __init__.py

* Update mjpeg.py

* Update mjpeg.py

* Update ffmpeg.py

* Update ffmpeg.py

* Update ffmpeg.py

* Update proxy.py

* Update __init__.py

* Update aiohttp_client.py

* Update aiohttp_client.py

* Update proxy.py

* Update proxy.py

* Fix await inside coroutine

* Fix async syntax

* Lint

* Cast/Sonos: create config entry if manually configured (home-assistant#15630)

* Cast/Sonos: create config entry if manually configured

* Add test for helper

* Add ability to set Zwave protection commandclass (home-assistant#15390)

* Add API for protection commandclass

* Adjusting

* tests

* Spelling

* Missed flake8

* Period

* spelling

* Review changes

* removing additional .keys()

* period

* Move i/o out into executor pool

* Move i/o out into executor pool

* Forgot get method

* Do it right... I feel stupid

* Long lines

* Merging

* Update Neato library to allow for dynamic endpoints (home-assistant#15639)

* Fix typo `asayn_init` instead of `async_init` (home-assistant#15645)

* Add ipban for failed login attempt in new login flow (home-assistant#15551)

* Add ipban for failed login attempt in new login flow

* Address review comment

* Use decorator to clean up code

* Add Tuya cover and scene platform (home-assistant#15587)

* Add Tuya cover platform

* Add Tuya cover and scene

* fix description

* remove scene default method

* Update smappy library version (home-assistant#15636)

Adding latest smappy lib version

Updated smappy library version

* Bugfix HomeKit name and serial_number (home-assistant#15600)

* Bugfix HomeKit name and serial_number

* Revert serial_number changes

* Frontend component should auto load auth coomponent (home-assistant#15606)

* Use case insensitive comparison for Sonos model check (home-assistant#15604)

* Cast/Sonos: create config entry if manually configured (home-assistant#15630)

* Cast/Sonos: create config entry if manually configured

* Add test for helper

* Bumped version to 0.74.1

* Allow changing entity ID (home-assistant#15637)

* Allow changing entity ID

* Add support to websocket command

* Address comments

* Error handling

* Bump frontend to 20180724.0

* Downgrade netatmo warning log to info (home-assistant#15652)

* Add turn_on/off service to camera (home-assistant#15051)

* Add turn_on/off to camera

* Add turn_on/off supported features to camera.

Add turn_on/off service implementation to camera, add turn_on/off
 supported features and services to Demo camera.

* Add camera supported_features tests

* Resolve code review comment

* Fix unit test

* Use async_add_executor_job

* Address review comment, change DemoCamera to local push

* Rewrite tests/components/camera/test_demo

* raise HTTPError instead return response

* Allow defining default turn-on values for lights in the profiles file. (home-assistant#15493)

* Allow defining default turn-on values for lights in the profiles file.

* Mock out file operations in unit test.

* Fix unit test flakiness.

* Avoid unnecessary copy

* Added user credentials to current_user ws endpoint. (home-assistant#15558)

* Added user credentials to current_user ws endpoint.

* Comments. Added another test.

* Return list of credentials.

* Import collections abstract base classes from collections.abc (home-assistant#15649)

Accessing them directly through collections is deprecated since 3.7, and
will no longer work in 3.8.

* Auth typing improvements (home-assistant#15640)

* Always return bytes from auth.providers.homeassistant.hash_password

Good for interface cleanliness, typing etc.

* Add some homeassistant auth provider type annotations

* Fix CORS duplicate registration (home-assistant#15670)

* Fix CORS duplicate registration (home-assistant#15670)

* Bumped version to 0.74.2

* Add spider thermostat (home-assistant#15499)

* add spider thermostats

* Added load_platform. Added operation dictionary. Minor improvements

* loop over spider components for load_platform

* added empty dict to load_platform. changed add_devices

* moved logic to the API

* fix requirements_all.txt

* minor code improvements

* Add Brunt Cover Device (home-assistant#15653)

* New Brunt Branch

* Some small changes and updates based on review.

* 0.74.2 (home-assistant#15671)

* Fix CORS duplicate registration (home-assistant#15670)

* Bumped version to 0.74.2

* Pylint 2 useless-return fixes (home-assistant#15677)

* Allow Nest Cam turn on/off (home-assistant#15681)

* Allow Nest Cam turn on/off

* Don't raise Error

* Remove unnecessary state update

* Upgrade pylint to 2.0.1 (home-assistant#15683)

* Upgrade pylint to 2.0.1

* Pylint 2 bad-whitespace fix

* Pylint 2 possibly-unused-variable fixes

* Pylint 2 try-except-raise fixes

* Disable pylint fixme for todoist for now

PyCQA/pylint#2320

* Disable pylint 2 useless-return for now

PyCQA/pylint#2300

* Disable pylint 2 invalid-name for type variables for now

PyCQA/pylint#1290

* Disable pylint 2 not-an-iterable for now

PyCQA/pylint#2311

* Pylint 2 unsubscriptable-object workarounds

* Disable intentional pylint 2 assignment-from-nones

* Disable pylint 2 unsupported-membership-test apparent false positives

* Disable pylint 2 assignment-from-no-return apparent false positives

* Disable pylint 2 comparison-with-callable false positives

PyCQA/pylint#2306

* Bump frontend to 20180726.0

* Fix frontend tests

* Fixes a bug with showing a subset of Pollen index conditions (home-assistant#15694)

* Add spider power plug component (home-assistant#15682)

* Add spider power plug component

* rounding down the numbers

* ability to throttle the API

* updated to the lastest api

* resolved an issue within the API

* Add support for P5 FutureNow light platform (home-assistant#15662)

* Added support for FutureNow light platform and relay/dimmer units

* Pinned specific version for requirement

* Added support for FutureNow light platform and relay/dimmer units

* Added futurenow.py to .coveragerc.

* Minor fixes and enhancements as requested in the code review.

* Minor fixes and enhancements as requested in the code review.

* Use device_config's value directly as it's validated as boolean.

* Simplify state check.

* Fixed brightness update that was broken in previous commit.

* Only log change to use access token warning once (home-assistant#15690)

* Add support for alarm_control_panel to MQTT Discovery. (home-assistant#15689)

* Add Magicseaweed API support (home-assistant#15132)

* Added support for magicseaweed surf forecasting

* Added support for magicseaweed surf forecasting

* Added support for magicseaweed surf forecasting

* Incorporate @bachya requested changes.

* Adding support for magicseaweed package.

* Run tests and fix errors.

* Incorporate @balloob requested changes.

* Attempt to fix pylint error e1101.

* Two spaces before inline comments

* Add @MartinHjelmare & @balloob requested changes.

* Remove MagicSeaweedData object inheritance.

* Fix variable logic.

* Upgrade pyvera to 0.2.44 (home-assistant#15708)

* Remove IHC XML Element from discovery data (home-assistant#15719)

* Context (home-assistant#15674)

* Add context

* Add context to switch/light services

* Test set_state API

* Lint

* Fix tests

* Do not include context yet in comparison

* Do not pass in loop

* Fix Z-Wave tests

* Add websocket test without user

* Break up components/auth (home-assistant#15713)

* Add a component for Sisyphus Kinetic Art Tables (home-assistant#14472)

* Add a component for Sisyphus Kinetic Art Tables

The [Sisyphus Kinetic Art Table](https://sisyphus-industries.com/) uses a
steel ball to draw intricate patterns in sand, thrown into sharp relief by a
ring of LED lights around the outside.

This component enables basic control of these tables through Home Assistant.

* Fix lints

* Docstrings, other lints

* More lints

* Yet more.

* Feedback

* Lint

* Missed one piece of feedback

* - Use async_added_to_hass in media player
- async_schedule_update_ha_state in listeners
- constants for supported features
- subscripting for required keys
- asyncio.wait
- update to sisyphus-control with passed-in session

* Update requirements

* lint

* Command Line Sensor - json_attributes (home-assistant#15679)

* Add tests to command_line for json_attrs

* Add json_attrs to command_line

* Remove whitespace on blank line

* Stick to <80 row length

* Use collections.Mapping, not dict

* Rename *attrs to *attributes

* Remove extraneous + for string concat

* Test multiple keys

* Add test

Makes sure the sensor's attributes don't contain a value for a missing key,
even if we want that key.

* Test that unwanted keys are skipped

* Remove additional log line

* Update tests for log changes

* Fix ordering

* Upgrade youtube_dl to 2018.07.21 (home-assistant#15718)

* Upgrade numpy to 1.15.0 (home-assistant#15722)

* Upgrade spiderpy to 1.2.0 (home-assistant#15729)

* Upgrade beautifulsoup4 to 4.6.1 (home-assistant#15727)

* Upgrade mutagen to 1.41.0 (home-assistant#15739)

* Upgrade sqlalchemy to 1.2.10 (home-assistant#15737)

* Upgrade voluptuous to 0.11.3 (home-assistant#15735)

* Upgrade youtube_dl to 2018.07.29 (home-assistant#15734)

* Upgrade pyowm to 2.9.0 (home-assistant#15736)

* Various updates (home-assistant#15738)

* Denonavr version push to 0.7.5 (home-assistant#15743)

* Version push to 0.7.5

Improve logger warning

* Denonavr v.0.7.5

* Make FutureNow light remember last brightness when turning on (home-assistant#15733)

* Remember last brightness value and use it on turn_on()

* Pyfnip-0.2 now returns state reliably, no manual changes needed.

* Split too long line of code

* Updated pyfnip library version

* Add Genie Aladdin Connect cover component (home-assistant#15699)

* Add Genie Aladdin Connect cover component

* Fix lines being too long

* Fix issues found in review

* remove Unknown state, use None instead

* Fixed requirements_all

* Add mvglive option to store multiple departures in attributes (home-assistant#15454)

* MVG Live sensor: add option to store multiple departures in attributes

* Fix lint error

* mvglive: take into account timeoffset in API call

* Prevent exception if departure list is empty

* Rename state_attributes -> device_state_attributes

* Add other wemo motion sensor identifier (home-assistant#15627)

* Add other motion sensor identifier

* Fix order

* Remove self type hints (home-assistant#15732)

* Remove self type hints

* Lint

* Bumped version to 0.75.0b0

* Upgrade Adafruit-DHT to 1.3.3 (home-assistant#15706)

* Change to newer pip package

The package Adafruit_Python_DHT==1.3.2 was broken and would not install, breaking DHT sensor support in Home assistant. It has since been fixed in Adafruit-DHT==1.3.3.

See: adafruit/Adafruit_Python_DHT#99

* Update requirements_all.txt

New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.

* Comment out Adafruit-DHT

Adafruit_Python_DHT changed name to Adafruit-DHT, which still need pyx support breaking our CI, need to be comment out.

* Update requirements_all.txt

* Add kodi unique id based on discovery (home-assistant#15093)

* kodi add unique id based on discovery

* initialize unique_id to None

* use netdisco-extracted mac_address

* use an uuid instead of mac for real uniqueness

* add missing docstring

* verify that there is no entity already for the given unique id

* whitespace fix

* Better handling of Yi camera being disconnected (home-assistant#15754)

* Better handling of Yi camera being disconnected

* Handling video processing as well

* Cleanup

* Member-requested changes

* Member-requested changes

* Decouple login flow view and data entry flow view (home-assistant#15715)

* Fixed NDMS for latest firmware (home-assistant#15511)

* Fixed NDMS for latest firmware.
Now using telnet instead of Web Interface

* Using external library for NDMS interactions

* updated requirements_all

* renamed `mac` to `device` back

* Using generators for name and attributes fetching

* Add disallow_untyped_calls to mypy check. (home-assistant#15661)

* Add disallow_untyped_calls to mypy check.

* Fix generator

* Update pyozw to 0.4.9 (home-assistant#15758)

* update pyozw to 0.4.8

* add requirements_all.txt

* use 0.4.9

* Convert wind speed to km/h (fixes home-assistant#15710) (home-assistant#15740)

* Convert wind speed to km/h (fixes home-assistant#15710)

* Round speed

* Round precipitation forecast to 1 decimal place (home-assistant#15759)

The OWM returns precipitation forecast values as they are submitted to their network. It can lead to values like `0.0025000000000004 mm` which does not make sense and messes up the display card. This PR rounds the value to 1 decimal place.

* Add a "Reviewed by Hound" badge (home-assistant#15767)

* Upgrade Mastodon.py to 1.3.1 (home-assistant#15766)

* This component API has been decomissioned on the 31st of May 2018 by Telstra (home-assistant#15757)

See home-assistant#15668

* Fix docstrings (home-assistant#15770)

* Update pynetgear to 0.4.1 (bugfixes) (home-assistant#15768)

* Opensky altitude (home-assistant#15273)

* Added Altitude to opensky

* decided to take all metadata

* Final Tidy

* More formatting

* moving CONF_ALTITUDE to platform

* Moved CONF_ALTITUDE to platform

* Expose internal states and fixed on/off state of Dyson Fans (home-assistant#15716)

* exposing internal state and fixed onoff state

* fixed styling

* revert file mode changes

* removed self type hints

* better unit test and changed the way to return attributes

* made wolfie happy

* deCONZ - support for power plugs (home-assistant#15752)

* Initial commit for deCONZ switch support

* Fix hound comment

* Fix martins comment; platforms shouldn't depend on another platform

* Fix existing tests

* New tests

* Clean up unnecessary methods

* Bump requirement to v43

* Added device state attributes to light

* Add support for STATES of vacuums (home-assistant#15573)

* Vacuum: Added support for STATES

* Added debug logging and corrected state order

* typo

* Fix travis error, STATE = STATE for readability

* status -> state

* Changed to Entity instead of ToogleEntity

* Updated some vacuums

* Revert changes

* Revert Changes

* added SUPPORT_STATE

* Woof?

* Implement on/off if STATE not supported

* Moved new state vaccum to Class StateVacuumDevice

* Error: I should go to bed

* Moved around methods for easier reading

* Added StateVacuumDevice demo vacuum

* Added tests for StateVacuumDevice demo vacuum

* Fix styling errors

* Refactored to BaseVaccum

* Vacuum will now go back to dock

* Class BaseVacuum is for internal use only

* return -> await

* return -> await

* Add support for STATE_AUTO of generic_thermostat (home-assistant#15678)

Add support for STATE_AUTO of generic_thermostat

* Revert "Add support for STATE_AUTO of generic_thermostat (home-assistant#15678)" (home-assistant#15783)

This reverts commit 2e5131b.

* RitAssist / FleetGO support (home-assistant#15780)

* RitAssist / FleetGO support

* Fix lint issue
Add to .coveragerc

* Add support for OpenUV binary sensors and sensors (home-assistant#15769)

* Initial commit

* Adjusted ownership and coverage

* Member-requested changes

* Updated Ozone to a value, not an index

* Verbiage update

* Bumped version to 0.75.0b1

* Update translations

* Update translations

* Update frontend to 20180802.0

* Update frontend to 20180802.0

* Update pymediaroom to 0.6.4 (home-assistant#15786)

* Dependency version bump

* bump version

* Fix Min/Max Kelvin color temp attribute for Google (home-assistant#15697)

* Fix Min/Max Kelvin color temp attribute for Google

Max Kelvin is actually Min Mireds and vice-versa. K = 1000000 / mireds

* Update test_smart_home.py

* Update test_trait.py

* Add Enphase Envoy component (home-assistant#15081)

* add enphase envoy component

* Add Enphase Envoy component for energy monitoring

* Fix formatting problems

* Fix formatting errors

* Fix formatting errors

* Fix formatting errors

* Change unit of measurement to W or Wh. Return sensor states as integers

* Fix formatting errors

* Fix formatting errors

* Fix formatting errors

* Move import json to update function

* Fix formatting. Add file to .coveragerc

* Add new component to requirements_all.txt

* Move API call to third party library on PyPi

* Refactor

* Run gen_requirements_all.py

* Minor refactor

* Fix indentation

* Fix indentation

* Return True from Nest setup (home-assistant#15797)

* Vacuum component: start_pause to individual start and pause commands. (home-assistant#15751)

* Add start and pause to StateVacuumDevice, move start_pause to VacuumDevice

* Updated demo vacuum and tests

* Add a few more tests

* Bump frontend to 20180803.0

* Bump frontend to 20180803.0

* Make sure use_x_forward_for and trusted_proxies must config together (home-assistant#15804)

* Make sure use_x_forward_for and trusted_proxies must config together

* Fix unit test

* Only report color temp when in the correct color mode (home-assistant#15791)

* Fix Min/Max Kelvin color temp attribute for Google (home-assistant#15697)

* Fix Min/Max Kelvin color temp attribute for Google

Max Kelvin is actually Min Mireds and vice-versa. K = 1000000 / mireds

* Update test_smart_home.py

* Update test_trait.py

* Return True from Nest setup (home-assistant#15797)

* Only report color temp when in the correct color mode (home-assistant#15791)

* Bumped version to 0.75.0

* Upgrade voluptuous-serialize to 2.0.0 (home-assistant#15763)

* Upgrade voluptuous-serialize to 2.0.0

* Change to 2.0.0

* Bump frontend to 20180804.0

* Bump frontend to 20180804.0

* Upgrade pylint to 2.1.0 (home-assistant#15811)

* Upgrade pylint to 2.1.0

* Remove no longer needed pylint disables

* Upgrade pytest to 3.7.1 and pytest-timeout to 1.3.1 (home-assistant#15809)

* Fix rfxtrx device id matching (home-assistant#15819)

* Issue home-assistant#15773

Fix PT2262 devices are incorrectly matched in rfxtrx component

* style

* Upgrade Adafruit-DHT to 1.3.3 (home-assistant#15706)

* Change to newer pip package

The package Adafruit_Python_DHT==1.3.2 was broken and would not install, breaking DHT sensor support in Home assistant. It has since been fixed in Adafruit-DHT==1.3.3.

See: adafruit/Adafruit_Python_DHT#99

* Update requirements_all.txt

New or updated dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.

* Comment out Adafruit-DHT

Adafruit_Python_DHT changed name to Adafruit-DHT, which still need pyx support breaking our CI, need to be comment out.

* Update requirements_all.txt

* Fix rfxtrx device id matching (home-assistant#15819)

* Issue home-assistant#15773

Fix PT2262 devices are incorrectly matched in rfxtrx component

* style

* Bumped version to 0.75.1

* Fix lint with wrong frontend version inside requirements_all

* Fix lint with wrong frontend version inside requirements_test_all

* Fix frontend requirements after bump (home-assistant#15829)

* Upgrade voluptuous to 0.11.5 (home-assistant#15830)

* Add support for 2 Tahoma IO awning covers (home-assistant#15660)

* Add Tahoma io:VerticalExteriorAwningIOComponent and io:HorizontalAwningIOComponent

* Fix position of horizontal awning cover

* Add timestamps for lock time

* Adjust open-close actions for horizontal awning cover

* Fix stop action for io:RollerShutterGenericIOComponent

* Remove redundant information

* Use get for dict lookup

* Velbus auto-discovery (home-assistant#13742)

* remove velbus fan and light platforms

these platforms should not be there since they can be created with template components based on switch platform

* use latest version of python-velbus which supports auto-discovery of modules

* fix linting errors

* fix linting errors

* fix linting errors

* address review comments from @MartinHjelmare

* update based on automatic feedback

* fix linting errors

* update dependency

* syntax corrections

* fix lint warning

* split out common functionality in VelbusEntity
use sync methods for loading platforms
support unique_ids so that entities are registred in entity registry

* fix linting errors

* fix linting errors

* fix linting errors

* integrate review comments (common functionality in VelbusEntity class)

* rename DOMAIN import to VELBUS_DOMAIN

* revert change created by requirements script

* regen

* Upgrade youtube_dl to 2018.08.04 (home-assistant#15837)

* Add media_player.dlna_dmr component (home-assistant#14749)

* Add media_player.dlna_dmr component

* PEP 492

* Move DIDL-template up

* Remove max_volume-override option

* Remove picky_device support

* Use DEFAULT_NAME

* Make supported_features static

* Remove unneeded argument

* Proper module-docstring

* Add http dependency

* Remove additional_configuration options, no longer used

* Change default name to 'DLNA Digital Media Renderer'

* Use python-didl-lite for DIDL-Lite-xml construction/parsing

* Handle NOT_IMPLEMENTED for UPnP state variables RelativeTimePosition and CurrentMediaDuration

* Use UPnP-UDN for unique_id

* Proper handling of upnp events

* Keeping flake8 happy

* Update requirements_all.txt

* Make UDN optional

* Ensure NotifyView is started, before using it

* Only subscribe to services we're interested in

* Don't update state_variables if value has not been changed + minor refactoring

* Improve play_media, follow flow of DLNA more closely

* Hopefully fix ClientOSError problems

* Flake8 fixes

* Keep pylint happy

* Catch errors and report gracefully

* Update async_upnp_client to 0.11.0

* Don't be so noisy

* Define/use constants for HTTP status codes

* Add discovery entry for dlna_dmr

* More robustness with regard to state variable not being set (yet)

* Keep privates hidden

* Handle NOT_IMPLEMENTED for CurrentTrackMetaData state variable

* Fixes in async_upnp_client + renew UPnP subscriptions regularly

* Not too eager

* Refactor duplicate code to _current_transport_actions and improve parsing of actions

* Support RC:1 to RC:3 and AVT:1 to AVT:3

* Moved DLNA-specifics to async_upnp_client.dlna.DmrDevice

* Use our own HTTP server to listen for events.

* More clear and explicit log message for easier troubleshooting

* Follow changes by hass, fixes traceback

* Fix not being able to do next

* Changes after review by @MartinHjelmare

* Linting

* Use homeassistant.util.get_local_ip

* Moved upnp event handling to async_upnp_client

* Keeping pylint happy

* Changes after review by @MartinHjelmare

* Fix envisalink reconnect (home-assistant#15832)

* Fix logic for handling connection lost/reconnect

* Fixed line length issue.

* Remove 'volume' from return dict (home-assistant#15842)

home-assistant#15271

intraday results do not return the volume. See https://www.alphavantage.co/documentation/#intraday

* Upgrade shodan to 1.9.0 (home-assistant#15839)

* Add max_gps_accuracy option to Google Maps (home-assistant#15833)

* Google Maps - Add max_gps_accuracy option

* Remove else statement and add continue

* Fix bt_home_hub_5 device tracker (home-assistant#15096)

* Fix bt_home_hub_5 device tracker

Updated BT Home Hub 5 device tracker component to get it working again. The old parsing method of the DNS table has been broken for a while causing the component to fail to get connected devices. A new parsing method has been implemened and fixes all previous issues.

* Moved part of code to a published PyPi library

* Fixed Violations

* Fixed bugs in device tracker

* Moved API Specific Code to PyPi Repository

* Updated to fit requested changes, removed test as it is no longer valid and updated requirement_all.txt

* Update to fit style requirements and remove redundant code

* Removed Unnecessary Comment

* Change to call_service async_stop non-blocking to allow service call finish (home-assistant#15803)

* Call later sync_stop to allow service call finish

* Change to use non-blocking service all for restart and stop

* Try to fix coveralls unstable result (home-assistant#15800)

* Create one tox env for code coverage report

pytest-cov generated report in project root folder, not tox env folder.

* Add cov tox env to travis

* Coveralls seems expecting all build jobs upload

* Only upload coverage after cov env success

* Add different pop 012501 ID (home-assistant#15838)

* Fix error when Series missing 'episodeFileCount' or 'episodeCount' (home-assistant#15824)

* Fix error when Series missing 'episodeFileCount' or 'episodeCount'

* Update sonarr.py

* Update sonarr.py

* Fix requirements

* Upgrade voluptuous to 0.11.5 (home-assistant#15830)

* Fix envisalink reconnect (home-assistant#15832)

* Fix logic for handling connection lost/reconnect

* Fixed line length issue.

* Bumped version to 0.75.2

* Bumped version to 0.76.0.dev0

* Add facebox auth (home-assistant#15439)

* Adds auth

* Update facebox.py

* Update test_facebox.py

* Update facebox.py

* Update facebox.py

* Update facebox.py

* Update facebox.py

* Remove TIMEOUT

* Update test_facebox.py

* fix lint

* Update facebox.py

* Update test_facebox.py

* Update facebox.py

* Adds check_box_health

* Adds test auth

* Update test_facebox.py

* Update test_facebox.py

* Update test_facebox.py

* Update test_facebox.py

* Ups coverage

* Update test_facebox.py

* Update facebox.py

* Update test_facebox.py

* Update facebox.py

* Update test_facebox.py

* Update facebox.py

* Update facebox.py

* Update facebox.py

* Upgrade requests_mock to 1.5.2

* Revert "Upgrade requests_mock to 1.5.2"

This reverts commit a7db2eb.

* Upgrade holidays to 0.9.6 (home-assistant#15831)

* Upgrade pysnmp to 4.4.5 (home-assistant#15854)

* Fix HomeKit test (home-assistant#15860)

* Don't raise NotImplementedError during test

* Do not make internet connection during tests (home-assistant#15858)

* Do not make internet connection

* Small improvement

* Upgrade pylint to 2.1.1 (home-assistant#15872)

* Upgrade asynctest to 0.12.2 (home-assistant#15869)

* Upgrade Sphinx to 1.7.6 (home-assistant#15868)

* Upgrade requests_mock to 1.5.2 (home-assistant#15867)

* Update based upon forum post (home-assistant#15876)

Based upon [this post](https://community.home-assistant.io/t/device-tracker-ping-on-windows-not-working-solved/61474/3) it looks like we've found why people couldn't get the ping tracker working on Windows.

* Upgrade netdisco to 2.0.0 (home-assistant#15885)

* Follow changes to netdisco, separating DLNA into DLNA_DMS and DLNA_DMR (home-assistant#15877)

* Follow changes to netdisco, separating DLNA into DLNA_DMS and DLNA_DMR

* No uppercase for names of netdisco discoverables

* Upgrade pylast to 2.4.0 (home-assistant#15886)

* Add auth/authorize endpoint (home-assistant#15887)

* Upgrade locationsharinglib to 2.0.11 (home-assistant#15902)

* Refactor data entry flow (home-assistant#15883)

* Refactoring data_entry_flow and config_entry_flow

Move SOURCE_* to config_entries
Change data_entry_flow.FlowManager.async_init() source param default
 to None
Change this first step_id as source or init if source is None
_BaseFlowManagerView pass in SOURCE_USER as default source

* First step of data entry flow decided by _async_create_flow() now

* Lint

* Change helpers.config_entry_flow.DiscoveryFlowHandler default step

* Change FlowManager.async_init source param to context dict param

* Fix downgrade hassio cannot get refresh_token issue (home-assistant#15874)

* Fix downgrade hassio issue

* Update __init__.py

* Fix downgrade hassio cannot get refresh_token issue (home-assistant#15874)

* Fix downgrade hassio issue

* Update __init__.py

* Bumped version to 0.75.3

* Add HomematicIP Cloud smoke detector device (home-assistant#15621)

* Add smoke detector device

* Remove not needed __init__ functions

* Fix for multiple camera switches naming of entity (home-assistant#14028)

* Fix for multiple camera switches naming of entity

appended camera name to the switch entity name.

* Update amcrest.py

* Update amcrest.py

* Update amcrest.py

* Update amcrest.py

* Update amcrest.py

* Update amcrest.py

* Update amcrest.py

* Update amcrest.py

* Update amcrest.py

* Update amcrest.py

* Update amcrest.py

* Add digest authentification

* Update rest_command.py

* Update config.py

* Update rest_command.py

* Update config.py

* Add realtime true/false switch for Waze (home-assistant#15228)

* Add PJLink media player platform (home-assistant#15083)

* add pjlink media player component

* retrieve pjlink device name from projector if name isn't specified in configuration

* update .coveragerc

* fix style

* add missing docstrings

* address PR comments from @MartinHjelmare

* fix code style

* use snake case string for source names

* add missing period at the end of comment string

* rewrite method as function

* revert to use source name provided by projector

* Some typing related fixes (home-assistant#15899)

* Fix FlowManager.async_init handler type

It's not a Callable, but typically a key pointing to one in a dict.

* Mark pip_kwargs return type hint as Any-valued dict

install_package takes other than str args too.

* Update August component to use py-august:0.6.0 (home-assistant#15916)

* Misc cleanups (home-assistant#15907)

* device_tracker.huawei_router: Pylint logging-not-lazy fix

* sensor.irish_rail_transport: Clean up redundant self.info test

* Update radiotherm to 1.4.1 (home-assistant#15910)

* Fix bug in translations upload script (home-assistant#15922)

* Add and restore context in recorder (home-assistant#15859)

* Add IndieAuth 4.2.2 redirect uri at client id (home-assistant#15911)

* Add IndieAuth 4.2.2 redirect uri at client id

* Fix tests

* Add comment

* Limit to first 10kB of each page

* deCONZ - Add support for sirens (home-assistant#15896)

* Add support for sirenes

* Too quick...

* Fix test

* Use siren instead of sirene

* Add RMV public transport sensor (home-assistant#15814)

* Add new public transport sensor for RMV (Rhein-Main area).

* Add required module.

* Fix naming problem.

* Add unit test.

* Update dependency version to 0.0.5.

* Add new requirements.

* Fix variable name.

* Fix issues pointed out in review.

* Remove unnecessary code.

* Fix linter error.

* Fix config value validation.

* Replace minutes as state by departure timestamp. (see #home-assistant#14983)

* More work on the timestamp. (see #home-assistant#14983)

* Revert timestamp work until home-assistant#14983 gets merged.

* Simplify product validation.

* Remove redundant code.

* Address code change requests.

* Address more code change requests.

* Address even more code change requests.

* Simplify destination check.

* Fix linter problem.

* Bump dependency version to 0.0.7.

* Name variable more explicit.

* Only query once a minute.

* Update test case.

* Fix config validation.

* Remove unneeded import.

* ✏️ Corrects typo in code comments (home-assistant#15923)

`MomematicIP` -> `HomematicIP`

* Update frontend to 20180811.0

* Bumped version to 0.76.0b0

* Update frontend to 20180813.0

* Upgrade pymysensors to 0.17.0 (home-assistant#15942)

* Deprecate remote.api (home-assistant#15955)

* Bumped version to 0.76.0b1

* Add context to login flow (home-assistant#15914)

* Add context to login flow

* source -> context

* Fix unit test

* Update comment

* Added error handling for sense API timeouts (home-assistant#15789)

* Added error handling for sense API timeouts

* Moved imports in function

* Moved imports to more appropriate function

* Change exception to custom package version

* MQTT embedded broker has to set its own password. (home-assistant#15929)

* Fix issue when reading worxlandroid pin code (home-assistant#15930)

Fixes home-assistant#14050

* remove-phantomjs-from-docker (home-assistant#15936)

* Remove remote.API from core.Config (home-assistant#15951)

* Use core.ApiConfig replace remote.API in core.Config

* Move ApiConfig to http

* Switch to intermediate Mozilla cert profile (home-assistant#15957)

* Allow choosing intermediate SSL profile

* Fix tests

* Use JWT for access tokens (home-assistant#15972)

* Use JWT for access tokens

* Update requirements

* Improvements

* Pin crypto (home-assistant#15978)

* Pin crypto

* Fix PyJWT import once

* Bumped version to 0.76.0b2

* Update translations

* Teak mqtt error message for 0.76 release (home-assistant#15983)

* Fix 0.76 beta2 hassio token issue (home-assistant#15987)

* Bumped version to 0.76.0b3

* Bump frontend to 20180816.0

* Fix Nest async from sync (home-assistant#15997)

* Fix mysensors connection task blocking setup (home-assistant#15938)

* Fix mysensors connection task blocking setup

* Schedule the connection task without having the core track the task
  to avoid blocking setup.
* Cancel the connection task, if not cancelled already, when
  home assistant stops.

* Use done instead of cancelled

* Bumped version to 0.76.0b4

* Bump frontend to 20180816.1

* Disable the DLNA component discovery (home-assistant#16006)

* Fix message "Updating dlna_dmr media_player took longer than ..." (home-assistant#16005)

* Bumped version to 0.76.0b5

* Version 0.76.0

* Bump frontend to 20180818.0

* Add forgiving add column (home-assistant#16057)

* Add forgiving add column

* Lint

* Tuya fix login problem and add login platform param (home-assistant#16058)

* add a platform param to distinguish different app's account.

* fix requirements

* Add notify platforms to loaded components (home-assistant#16063)

* Bumped version to 0.76.1

* Column syntax fix + Add a file if migration in progress (home-assistant#16061)

* Add a file if migration in progress

* Warning

* Convert message for migration to warning

* Update frontend to 20180820.0

* Forgiving add index in migration (home-assistant#16092)

* Bumped version to 0.76.2

cyberjacob pushed a commit to cyberjacob/home-assistant that referenced this pull request Sep 4, 2018

Add media_player.dlna_dmr component (home-assistant#14749)
* Add media_player.dlna_dmr component

* PEP 492

* Move DIDL-template up

* Remove max_volume-override option

* Remove picky_device support

* Use DEFAULT_NAME

* Make supported_features static

* Remove unneeded argument

* Proper module-docstring

* Add http dependency

* Remove additional_configuration options, no longer used

* Change default name to 'DLNA Digital Media Renderer'

* Use python-didl-lite for DIDL-Lite-xml construction/parsing

* Handle NOT_IMPLEMENTED for UPnP state variables RelativeTimePosition and CurrentMediaDuration

* Use UPnP-UDN for unique_id

* Proper handling of upnp events

* Keeping flake8 happy

* Update requirements_all.txt

* Make UDN optional

* Ensure NotifyView is started, before using it

* Only subscribe to services we're interested in

* Don't update state_variables if value has not been changed + minor refactoring

* Improve play_media, follow flow of DLNA more closely

* Hopefully fix ClientOSError problems

* Flake8 fixes

* Keep pylint happy

* Catch errors and report gracefully

* Update async_upnp_client to 0.11.0

* Don't be so noisy

* Define/use constants for HTTP status codes

* Add discovery entry for dlna_dmr

* More robustness with regard to state variable not being set (yet)

* Keep privates hidden

* Handle NOT_IMPLEMENTED for CurrentTrackMetaData state variable

* Fixes in async_upnp_client + renew UPnP subscriptions regularly

* Not too eager

* Refactor duplicate code to _current_transport_actions and improve parsing of actions

* Support RC:1 to RC:3 and AVT:1 to AVT:3

* Moved DLNA-specifics to async_upnp_client.dlna.DmrDevice

* Use our own HTTP server to listen for events.

* More clear and explicit log message for easier troubleshooting

* Follow changes by hass, fixes traceback

* Fix not being able to do next

* Changes after review by @MartinHjelmare

* Linting

* Use homeassistant.util.get_local_ip

* Moved upnp event handling to async_upnp_client

* Keeping pylint happy

* Changes after review by @MartinHjelmare

vrih added a commit to vrih/home-assistant that referenced this pull request Sep 29, 2018

Add media_player.dlna_dmr component (home-assistant#14749)
* Add media_player.dlna_dmr component

* PEP 492

* Move DIDL-template up

* Remove max_volume-override option

* Remove picky_device support

* Use DEFAULT_NAME

* Make supported_features static

* Remove unneeded argument

* Proper module-docstring

* Add http dependency

* Remove additional_configuration options, no longer used

* Change default name to 'DLNA Digital Media Renderer'

* Use python-didl-lite for DIDL-Lite-xml construction/parsing

* Handle NOT_IMPLEMENTED for UPnP state variables RelativeTimePosition and CurrentMediaDuration

* Use UPnP-UDN for unique_id

* Proper handling of upnp events

* Keeping flake8 happy

* Update requirements_all.txt

* Make UDN optional

* Ensure NotifyView is started, before using it

* Only subscribe to services we're interested in

* Don't update state_variables if value has not been changed + minor refactoring

* Improve play_media, follow flow of DLNA more closely

* Hopefully fix ClientOSError problems

* Flake8 fixes

* Keep pylint happy

* Catch errors and report gracefully

* Update async_upnp_client to 0.11.0

* Don't be so noisy

* Define/use constants for HTTP status codes

* Add discovery entry for dlna_dmr

* More robustness with regard to state variable not being set (yet)

* Keep privates hidden

* Handle NOT_IMPLEMENTED for CurrentTrackMetaData state variable

* Fixes in async_upnp_client + renew UPnP subscriptions regularly

* Not too eager

* Refactor duplicate code to _current_transport_actions and improve parsing of actions

* Support RC:1 to RC:3 and AVT:1 to AVT:3

* Moved DLNA-specifics to async_upnp_client.dlna.DmrDevice

* Use our own HTTP server to listen for events.

* More clear and explicit log message for easier troubleshooting

* Follow changes by hass, fixes traceback

* Fix not being able to do next

* Changes after review by @MartinHjelmare

* Linting

* Use homeassistant.util.get_local_ip

* Moved upnp event handling to async_upnp_client

* Keeping pylint happy

* Changes after review by @MartinHjelmare

@home-assistant home-assistant locked and limited conversation to collaborators Dec 10, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.