-
Notifications
You must be signed in to change notification settings - Fork 162
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
range: add oven timers and cook timers #843
Open
twilsonco
wants to merge
1
commit into
ollo69:master
Choose a base branch
from
twilsonco:pr-range-timers
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+167
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 should find a way to check if the device provide this sensor (
oven_upper_cook
) and if not just returnNone
, otherwise sensor for not existing cook zone will be created.This is the same for all the other new properties.
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. My oven only has upper, so the lower cook zone sensors are non-functional. I'll make the necessary changes for this.
Also, the stove top of my oven only reports whether any of the (five) burners are on, and it uses the front-left cooktop state to report it. So should cooktop state sensors also be modified (in a separate PR) in the same way you're suggesting here?
Thanks.
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.
Circling back around to this. I don't see any mechanism, in the current code, at least, for the detection of which sensors should or shouldn't be included. Rather, the optional
entity_registry_enabled_default
is used to control this regardless of the data coming from the device.My range has no lower oven, but they are still enabled by default, and though my
COOKTOP_LEFT_FRONT_STATE
is valid, it's disabled by default.Should we just make the call, as is currently done, as to which sensors are enabled by default? Or should we dig deeper and see if there's a way to find out which ones ought to be enabled?
It may be difficult to discern which sensors should be enabled by default, since I observe that the sensors that do not exist for my range show the same values as those that do exist when the range is not in use. We could provide some type of observational state where the user is instructed to go operate their range, turning on and off each cooktop burner, each oven, each timer/setting, and the integration could start with all sensors disabled, and enable each one whose state changes during the observational period. But that sounds complicated and annoying for users.
If we can't find a good method to do this automatically, then we have to make the call. Personally, I think that this integration, being a HACS integration, is for those users that desire more granular control and visibility for their LG appliances/devices, so it would be better to enable everything and let the user disable the inapplicable sensors. Alternatively, we should disable everything and let the user enable them manually. We would then include a note in the read-me or a dialog during setup that not all sensors may apply to their specific appliances/devices.