受欢迎的博客标签

使用ML.Net Developing an ML model to integrate into HA

Published

 

 

all the “start/stop” points collected, I can produce a dataset and save it to a csv file.

# Limit query to approx. a month’s worth of data
limit = 45000

# Build query string
query = f"""SELECT value FROM "°C" WHERE "entity_id"::tag = 'temperature_furnace_room' ORDER BY time DESC limit {limit}"""

# Prep request params
params = {
    'db':'home_assistant',
    'q':query
}
# Send get request to query endpoint
res = re.get("http://influxdb.local:8086/query",params=params)

# Extract data from response and convert to json
data = json.loads(res.content)['results'][0]['series'][0]['values']

 

 

 

 

 

 

 

https://community.home-assistant.io/t/developing-an-ml-model-to-integrate-into-ha/664317