From 89f59a758d6e8bdbb05bfd5749b023171e843ff3 Mon Sep 17 00:00:00 2001
From: Paulus Schoutsen
Date: Thu, 19 Feb 2015 23:31:06 -0800
Subject: [PATCH] Frontend: stream fires ping on connect
This is needed for Safari/Firefox to call onOpen
---
homeassistant/components/api.py | 4 +--
homeassistant/components/frontend/version.py | 2 +-
.../frontend/www_static/frontend.html | 2 +-
.../more-infos/more-info-configurator.html | 26 ++++++++++++++++---
4 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/homeassistant/components/api.py b/homeassistant/components/api.py
index e63a6ddd03a..a29b81e3cba 100644
--- a/homeassistant/components/api.py
+++ b/homeassistant/components/api.py
@@ -126,13 +126,13 @@ def _handle_get_api_stream(handler, path_match, data):
hass.bus.listen(MATCH_ALL, forward_events)
while True:
+ write_message(STREAM_PING_PAYLOAD)
+
block.wait(STREAM_PING_INTERVAL)
if block.is_set():
break
- write_message(STREAM_PING_PAYLOAD)
-
if not gracefully_closed:
_LOGGER.info("Found broken event stream to %s, cleaning up",
handler.client_address[0])
diff --git a/homeassistant/components/frontend/version.py b/homeassistant/components/frontend/version.py
index ccd7fa2afd9..50bad1647d1 100644
--- a/homeassistant/components/frontend/version.py
+++ b/homeassistant/components/frontend/version.py
@@ -1,2 +1,2 @@
""" DO NOT MODIFY. Auto-generated by build_frontend script """
-VERSION = "9d3e518a6c0516a3543fe6b364e4307b"
+VERSION = "b9bb73c7d937ff2219001668ea739134"
diff --git a/homeassistant/components/frontend/www_static/frontend.html b/homeassistant/components/frontend/www_static/frontend.html
index a9554066367..3dc2d5e2306 100644
--- a/homeassistant/components/frontend/www_static/frontend.html
+++ b/homeassistant/components/frontend/www_static/frontend.html
@@ -206,7 +206,7 @@ return pickBy("isBefore",args)};moment.max=function(){var args=[].slice.call(arg
{{stateObj.attributes.errors}}

{{stateObj.attributes.submit_caption || "Set configuration"}}
- Configuring…
+ Configuring…
Home Assistant