Added Price info
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
#===========================================================================
|
||||
#
|
||||
@@ -17,9 +17,9 @@ messages.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import bottle as B
|
||||
import sys
|
||||
import json
|
||||
import bottle as B
|
||||
import tHome as T
|
||||
|
||||
#===========================================================================
|
||||
@@ -41,6 +41,15 @@ def instant( client, data, cfg ):
|
||||
|
||||
return ( cfg.mqttPower, msg )
|
||||
|
||||
#===========================================================================
|
||||
def price( client, data, cfg ):
|
||||
msg = {
|
||||
"time" : data.TimeUnix,
|
||||
"price" : data.Price,
|
||||
"tier" : data.Tier,
|
||||
}
|
||||
return ( cfg.mqttPrice, msg )
|
||||
|
||||
#===========================================================================
|
||||
handlers = {
|
||||
#"BlockPriceDetail" :
|
||||
@@ -51,7 +60,7 @@ handlers = {
|
||||
#"MessageCluster" :
|
||||
#"MeterInfo" :
|
||||
#"NetworkInfo" :
|
||||
#"PriceCluster" :
|
||||
"PriceCluster" : price,
|
||||
#"Reading" :
|
||||
#"ScheduleInfo" :
|
||||
#"TimeCluster" :
|
||||
|
||||
Reference in New Issue
Block a user