Remove mysql bespoke function

This commit is contained in:
unknown
2022-09-09 00:29:52 +08:00
parent 85ece04f3e
commit f472da638a

View File

@@ -69,7 +69,7 @@ class homedb:
state_id,\
entity_id ,\
state ,\
if(last_changed is NULL,last_updated,last_changed) as last_changed ,\
last_changed ,\
last_updated ,\
old_state_id \
from states ORDER BY last_updated DESC;"
@@ -84,6 +84,7 @@ class homedb:
df = pd.DataFrame.from_dict(myresult)
df.columns = col_names
# Preprocessing
df = df.set_index("state_id")
df.to_pickle(f"{tsh_config.data_dir}/parsed/all_states.pkl")