Skip to content

Commit

Permalink
Update retrieve_hass.py
Browse files Browse the repository at this point in the history
Feat - Added support to publish complete forecast data as attributes for load cost and prod price
  • Loading branch information
davidusb-geek authored May 31, 2023
1 parent add21ae commit d500b92
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/emhass/retrieve_hass.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,12 @@ def post_data(self, data_df: pd.DataFrame, idx: int, entity_id: str,
elif 'SOC' in entity_id:
data = retrieve_hass.get_attr_data_dict(data_df, idx, entity_id, unit_of_measurement,
friendly_name, "battery_scheduled_soc", state)
elif 'unit_load_cost' in entity_id:
data = retrieve_hass.get_attr_data_dict(data_df, idx, entity_id, unit_of_measurement,
friendly_name, "unit_load_cost_forecasts", state)
elif 'unit_prod_price' in entity_id:
data = retrieve_hass.get_attr_data_dict(data_df, idx, entity_id, unit_of_measurement,
friendly_name, "unit_load_cost_forecasts", state)
elif from_mlforecaster:
data = retrieve_hass.get_attr_data_dict(data_df, idx, entity_id, unit_of_measurement,
friendly_name, "scheduled_forecast", state)
Expand Down

0 comments on commit d500b92

Please sign in to comment.