Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/sensor/bme280.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
except KeyError:
pass

async_add_devices(dev)
async_add_devices(dev, True)
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 remove the call to update from the BME280Handler constructor.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Line 129?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if it's not needed to signal the underlying library the first reading.

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.

update is our method. Adding True as second argument will make sure that Home Assistant calls update before adding to the state machine. So yes remove line 129.

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.

Resolved in chat. Update in constructor is not for an entity



class BME280Handler:
Expand Down