                                         {"month" "december" "reading" 9}]})
 
 (def app-state
-  {:selected false
+  {:selected []
    :devices []})
 
 (defn remove-chart []
   (.remove (first (nodelist-to-seq (.getElementsByTagName js/document "svg")))))
 
-(defn select-device [app device]
-  (.log js/console "select-device")
-  (remove-chart)
-  (om/update! app [:selected] (constantly device))
+(defn select-device [data device-name]
+  (.log js/console device-name)
+ ; (remove-chart)
+ ;  (om/transact! app [:selected] (constantly device-name))
   )
 
 ;;;;;;;;;;; List of devices for axis plots ;;;;;;;;;;

                                  #(vec (concat % [external-temp external-humidity])))]
        (om/root init-state (create-form-and-chart [:devices]
                                                   (device-list-item [:hecuba/name :name])
                                                   (chart-item [:hecuba/name :name]))
                 (.getElementById js/document "app")))))



    (reify
      om/IRender
      (render [_]
        (dom/div #js {:className "devices"}
                 (dom/form #js {:className "devices-form"}
                           (om/build-all device-item
                                         (get-in data model-path)
                                         {:key :hecuba/name})
                           (om/build chart-item data)))))))


(go (let [external-temp     {:hecuba/name "01"
