Add pincode fallback (#13587)

* Add pincode log statement

* Moved msg to show_setup_msg
pull/13618/head
cdce8p 2018-04-01 17:38:29 +02:00 committed by Paulus Schoutsen
parent dee47d50ec
commit cd96d7b2ec
1 changed files with 1 additions and 0 deletions

View File

@ -36,6 +36,7 @@ def validate_entity_config(values):
def show_setup_message(bridge, hass):
"""Display persistent notification with setup information."""
pin = bridge.pincode.decode()
_LOGGER.info('Pincode: %s', pin)
message = 'To setup Home Assistant in the Home App, enter the ' \
'following code:\n### {}'.format(pin)
hass.components.persistent_notification.create(