Skip to content

Commit

Permalink
Fix - Fixed message handling from request module.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidusb-geek committed Jan 31, 2023
1 parent c207cf9 commit a10cbb1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [0.3.36] - 2023-01-31
### Fix
- Fixed message handling from request module.

## [0.3.35] - 2023-01-31
### Fix
- Fixed access to injection_dict for the first time that emhass is used.
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'David HERNANDEZ'

# The full version, including alpha/beta/rc tags
release = '0.3.35'
release = '0.3.36'

# -- General configuration ---------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

setup(
name='emhass', # Required
version='0.3.35', # Required
version='0.3.36', # Required
description='An Energy Management System for Home Assistant', # Optional
long_description=long_description, # Optional
long_description_content_type='text/markdown', # Optional (see note above)
Expand Down
3 changes: 2 additions & 1 deletion src/emhass/retrieve_hass.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,11 @@ def post_data(self, data_df: pd.DataFrame, idx: int, entity_id: str,
if self.get_data_from_file:
class response: pass
response.status_code = 200
response.ok = True
else:
response = post(url, headers=headers, data=json.dumps(data))
# Treating the response status and posting them on the logger
if response.status_code == 200:
if response.ok:
self.logger.info("Successfully posted to "+entity_id+" = "+str(state))
else:
self.logger.info("The status code for received curl command response is: "+str(response.status_code))
Expand Down

0 comments on commit a10cbb1

Please sign in to comment.