Skip to content

Update efergy to add support for multiple channels#14286

Closed
daniel-stoneuk wants to merge 4 commits intohome-assistant:devfrom
daniel-stoneuk:dev
Closed

Update efergy to add support for multiple channels#14286
daniel-stoneuk wants to merge 4 commits intohome-assistant:devfrom
daniel-stoneuk:dev

Conversation

@daniel-stoneuk
Copy link
Copy Markdown

@daniel-stoneuk daniel-stoneuk commented May 4, 2018

Description:

Fix for the issue I pointed out here about a year ago. Adds support for solar installations using Eco-Eye or Wattson energy monitors. Changed entity id to include energy channel.

No documentation changes are applicable however entity id's will be different therefore it's a breaking change.

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox.

Fix for the issue I pointed out [here](https://community.home-assistant.io/t/efergy-2-or-more-sensors/10638/22?u=daniel-stoneuk) about a year ago. Adds support for solar installations using Eco-Eye or Wattson energy monitors
@homeassistant

This comment has been minimized.

response = get(url_string, timeout=10)
for sensor in response.json():
sid = sensor['sid']
sid = sensor['sid']+'_'+sensor['cid']
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use string formatting.

response = get(url_string, timeout=10)
for sensor in response.json():
if self.sid == sensor['sid']:
if self.sid == sensor['sid']+'_'+sensor['cid']:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dito

Applied to changes & elsewhere
@daniel-stoneuk
Copy link
Copy Markdown
Author

I have changed the edits that I've made to use string formatting however there are other elements of the component that do not use string formatting - is this okay?

@fabaff
Copy link
Copy Markdown
Member

fabaff commented Jul 9, 2018

This PR seems to have gone stale. Closing it. You can reopen it when you're ready to finish it.

@fabaff fabaff closed this Jul 9, 2018
@fabaff fabaff mentioned this pull request Jul 9, 2018
2 tasks
@home-assistant home-assistant locked and limited conversation to collaborators Dec 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants