-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suez water #23844
Suez water #23844
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The communication with the toutsurmoneau.fr should be handled by a module that is imported -> https://developers.home-assistant.io/docs/en/development_checklist.html
I'm working on it right now. |
Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>
Co-Authored-By: Fabian Affolter <mail@fabian-affolter.ch>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please include an attribution to the source of the data
Sorry but I don't understand what does that mean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the readme file.
See below for more comments.
…to suezWater Responses to PR home-assistant#23844 comments
self._attributes['history'] = {} | ||
for item in self.client.attributes['history']: | ||
self._attributes[ | ||
'history'][item] = self.client.attributes[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the items?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest months consumption.
I can't know the number of items in advance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is each item key the name of the month and the item value is the month consumption in liters?
Please describe the item in more detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, did not see this question.
history
will looks like that:
{ "Février 2019": 10109, "Mars 2019": 7553, "Avril 2019": 9003, "Mai 2019": 8844, "Juin 2019": 10472, "Juillet 2019": 4168 }
It seems that history contains last 6 months consumption.
item] = self.client.attributes[ | ||
'thisMonthConsumption'][item] | ||
self._attributes['previousMonthConsumption'] = {} | ||
for item in self.client.attributes['previousMonthConsumption']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the items?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Daily previous month consumption.
I can't know the number of items in advance.
'attribution'] = self.client.attributes[ | ||
'attribution'] | ||
self._attributes['thisMonthConsumption'] = {} | ||
for item in self.client.attributes['thisMonthConsumption']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the items?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Daily current month consumption.
I can't know the number of items in advance.
…ants returned directly, and remove of attribute. Update of .
Please rebase on latest dev branch to let the build pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good!
Can be merged when build passes. |
Description:
This component adds a sensor to Home-Assistant. This sensor fetches data from the French water provider Suez.
It gets the following data:
Example entry for
configuration.yaml
(if applicable):counter_id
is the water counter id. It can be found ontoutsurmoneau.fr
users account.Checklist:
tox
. Your PR cannot be merged unless tests passIf the code communicates with devices, web services, or third-party tools:
python3 -m script.hassfest
.requirements_all.txt
by runningpython3 -m script.gen_requirements_all
..coveragerc
.If the code does not interact with devices:
Pull request in home-assistant (if applicable): home-assistant/home-assistant.io#9576