From ece0902ab28519b0fb031b7b92ea690b47714f0e Mon Sep 17 00:00:00 2001
From: Paulus Schoutsen <Paulus@PaulusSchoutsen.nl>
Date: Fri, 31 Oct 2014 00:21:29 -0700
Subject: [PATCH] after calling a service on a group, update all states

---
 homeassistant/components/http/frontend.py       |  2 +-
 .../components/http/www_static/frontend.html    | 17 ++++++++++++-----
 .../www_static/polymer/home-assistant-api.html  |  9 +++++++--
 3 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/homeassistant/components/http/frontend.py b/homeassistant/components/http/frontend.py
index 637bb09bbe6..833f4c25af0 100644
--- a/homeassistant/components/http/frontend.py
+++ b/homeassistant/components/http/frontend.py
@@ -1,2 +1,2 @@
 """ DO NOT MODIFY. Auto-generated by build_polymer script """
-VERSION = "58011acca6d6fb5ec54edf5714b8c476"
+VERSION = "6ce8abfbeaacbe30baeffc8875c023e5"
diff --git a/homeassistant/components/http/www_static/frontend.html b/homeassistant/components/http/www_static/frontend.html
index d4a0e5a0127..def2f07226e 100644
--- a/homeassistant/components/http/www_static/frontend.html
+++ b/homeassistant/components/http/www_static/frontend.html
@@ -10239,6 +10239,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
       background-color: #039be5;
     }
 
+    state-badge[data-state=on][data-domain=light] {
+      color: #fff176;
+    }
+
     .name, .state.text {
       text-transform: capitalize;  
       font-weight: 300;
@@ -10266,20 +10270,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
     /* filling of circle when checked */
     paper-toggle-button::shadow paper-radio-button::shadow #onRadio {
       background-color: #039be5;
-      transition: background-color .2s;
     }
 
     /* line when checked */
     paper-toggle-button::shadow #toggleBar[checked] {
       background-color: #039be5;
-      transition: background-color .2s;
     }    
     </style>
 
     <div horizontal="" justified="" layout="">
       
       <div class="entity">
-        <state-badge domain="{{domain}}" state="{{state}}" on-click="{{editClicked}}">
+        <state-badge domain="{{domain}}" state="{{state}}" data-domain="{{domain}}" data-state="{{state}}" on-click="{{editClicked}}">
         </state-badge>
 
         <div class="info">
@@ -13897,8 +13899,13 @@ core-item {
 
           // if entity_id is a string, update 1 state, else all.
           if(typeof(parameters.entity_id === "string")) {
-            update_func = function() {
-              this.fetchState(parameters.entity_id);
+            // if it is a group, fetch all
+            if(parameters.entity_id.slice(0,6) == "group.") {
+              update_func = this.fetchStates
+            } else {
+              update_func = function() {
+                this.fetchState(parameters.entity_id);
+              }
             }
           } else {
             update_func = this.fetchStates
diff --git a/homeassistant/components/http/www_static/polymer/home-assistant-api.html b/homeassistant/components/http/www_static/polymer/home-assistant-api.html
index 1890bfa726d..8219129b863 100644
--- a/homeassistant/components/http/www_static/polymer/home-assistant-api.html
+++ b/homeassistant/components/http/www_static/polymer/home-assistant-api.html
@@ -173,8 +173,13 @@
 
           // if entity_id is a string, update 1 state, else all.
           if(typeof(parameters.entity_id === "string")) {
-            update_func = function() {
-              this.fetchState(parameters.entity_id);
+            // if it is a group, fetch all
+            if(parameters.entity_id.slice(0,6) == "group.") {
+              update_func = this.fetchStates
+            } else {
+              update_func = function() {
+                this.fetchState(parameters.entity_id);
+              }
             }
           } else {
             update_func = this.fetchStates
-- 
GitLab