@@ -17,7 +17,7 @@ function processComponentLoaded(
1717 if ( state === undefined ) return null ;
1818
1919 return {
20- components : state . components . concat ( event . data . component )
20+ components : state . components . concat ( event . data . component ) ,
2121 } ;
2222}
2323
@@ -29,10 +29,10 @@ const subscribeUpdates = (conn: Connection, store: Store<HassConfig>) =>
2929 "component_loaded"
3030 ) ,
3131 conn . subscribeEvents (
32- ( ) => fetchConfig ( conn ) . then ( config => store . setState ( config , true ) ) ,
32+ ( ) => fetchConfig ( conn ) . then ( ( config ) => store . setState ( config , true ) ) ,
3333 "core_config_updated"
34- )
35- ] ) . then ( unsubs => ( ) => unsubs . forEach ( unsub => unsub ( ) ) ) ;
34+ ) ,
35+ ] ) . then ( ( unsubs ) => ( ) => unsubs . forEach ( ( unsub ) => unsub ( ) ) ) ;
3636
3737const configColl = ( conn : Connection ) =>
3838 getCollection ( conn , "_cnf" , fetchConfig , subscribeUpdates ) ;
@@ -41,3 +41,9 @@ export const subscribeConfig = (
4141 conn : Connection ,
4242 onChange : ( state : HassConfig ) => void
4343) : UnsubscribeFunc => configColl ( conn ) . subscribe ( onChange ) ;
44+
45+ export const STATE_NOT_RUNNING = "NOT_RUNNING" ;
46+ export const STATE_STARTING = "STARTING" ;
47+ export const STATE_RUNNING = "RUNNING" ;
48+ export const STATE_STOPPING = "STOPPING" ;
49+ export const STATE_FINAL_WRITE = "FINAL_WRITE" ;
0 commit comments