-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Add Sensors to Weatherflow Cloud #111651
Add Sensors to Weatherflow Cloud #111651
Conversation
5879df0
to
5af9a04
Compare
9b6d055
to
4e5d42f
Compare
c83860b
to
90ee278
Compare
Your branch is tainted with unrelated already merged commits. |
032d879
to
59fcaf2
Compare
Everything should be fixed now -> did a clean rebase and a force push |
59fcaf2
to
f6e0ce2
Compare
0dc435b
to
1db2808
Compare
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
3e62e2f
to
ecac7fe
Compare
entry.entry_id | ||
] | ||
|
||
stations = coordinator.data.keys() |
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.
We don't need to access dict.keys()
to iterate over just the keys in a dict. Just do:
for key in some_dict:
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.
So I could rewrite like this:
async_add_entities(
WeatherFlowCloudSensor(coordinator, sensor_description, station_id)
for station_id in coordinator.data
for sensor_description in WF_SENSORS
)
instead of:
stations = coordinator.data.keys()
async_add_entities(
WeatherFlowCloudSensor(coordinator, sensor_description, station_id)
for station_id in stations
for sensor_description in WF_SENSORS
)
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.
Yes.
Proposed change
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: