Sketch out strategies#8959
Merged
Merged
Conversation
818c9f0 to
a441693
Compare
bdeb77a to
91205c7
Compare
bramkragten
reviewed
Apr 22, 2021
bramkragten
reviewed
Apr 22, 2021
balloob
commented
Apr 22, 2021
| import type { SaveDialogParams } from "./show-save-config-dialog"; | ||
|
|
||
| const EMPTY_CONFIG = { views: [] }; | ||
| const EMPTY_CONFIG: LovelaceConfig = { views: [{ title: "Home" }] }; |
Member
Author
There was a problem hiding this comment.
This one has bothered me for so long. When it's emtpy, it's not clear how you can add a card, because we have no view. Just adding a stub view to get creation of cards going.
bramkragten
reviewed
Apr 23, 2021
| this.hass.themes !== oldHass.themes || | ||
| this.hass.selectedTheme !== oldHass.selectedTheme) | ||
| ) { | ||
| applyThemesOnElement( |
Member
There was a problem hiding this comment.
We now don't set the theme on init, but only when the theme changes, we should also do this in _initializeConfig.
bramkragten
approved these changes
Apr 23, 2021
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Breaking change
Proposed change
Continues my and @zsarnett's work from #6273.
This adds support for strategies to Home Assistant.
The first strategy will be our auto generated Lovelace dashboard.
Strategies will have the ability to pre-process the Lovelace config. It can either generate a complete new one, or can be used to adjust what is currently there. Strategies have access to the
hassobject and can query any data from the backend that they need (ie area registry, or some custom data).Here is an example custom strategy https://gist.github.com/balloob/bf2715efba46420d6ba1a01586946308
To do:
narrowinto generationType of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: