Open bsculley opened 5 years ago
What you are seeing is just a data stream name being built (string). The :sunny:
part is simply an emoji token that gets replaced by an emoji in Initial State (see https://support.initialstate.com/hc/en-us/articles/360002915551-Emojis ). SENSOR_LOCATION_NAME is just a global variable that you can set at the top. The result is something like "☀️Office Temperature(C)" for the data stream name.
Thanks for the reply. Maybe I'm just being thick, but can you tell me by what data key the dashboard will reference the local temperature?
Thanks.
When you stream the local data into your Initial State account in this statement:
streamer.log(":sunny: " + SENSOR_LOCATION_NAME + " Temperature(C)", temp_c)
you are creating a stream key named something like :sunny: Office Temperature(C)
. That stream key will contain all values of the local temperature from the sense HAT. For the local temperature from Dark Sky, that stream key name will be Temperature
.
I'm thinking of implementing this idea using Node-Red, which has available nodes for both retrieving data from DarkSky and sending data to InitialState. Before beginning, I would like to know why the local data from SenseHat (or elsewhere) uses different (and not very intuitive) field names than the DarkSky data, for example, the local temperature is recorded as "sunny":
while the data from DarkSky is recorded as "Temperature":
streamer.log("Temperature",curr_conditions['currently']['temperature'])
Why not just substitute the local value for the one from DarkSky?