Skip to content

Commit

Permalink
Fix - Fixed if sentence to correctly use the supervisor API for publi…
Browse files Browse the repository at this point in the history
…sh data
  • Loading branch information
davidusb-geek committed Apr 18, 2022
1 parent cc5026a commit 0f67c27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/emhass/retrieve_hass.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def post_data(self, data_df: pd.DataFrame, idx: int, entity_id: str,
:type friendly_name: str
"""
if self.params is None: # If this is the case we suppose that we are using the supervisor API
if self.params is not None: # If this is the case we suppose that we are using the supervisor API
url = self.hass_url+"/states/"+entity_id
else: # Otherwise the Home Assistant Core API it is
url = self.hass_url+"api/states/"+entity_id
Expand Down

0 comments on commit 0f67c27

Please sign in to comment.