Convert toggle functions to TypeScript#2054
Closed
iantrich wants to merge 3 commits intohome-assistant:devfrom
Closed
Convert toggle functions to TypeScript#2054iantrich wants to merge 3 commits intohome-assistant:devfrom
iantrich wants to merge 3 commits intohome-assistant:devfrom
Conversation
balloob
reviewed
Nov 20, 2018
| @@ -17,4 +22,4 @@ export default function turnOnOffEntity(hass, entityId, turnOn = true) { | |||
| } | |||
|
|
|||
| hass.callService(serviceDomain, service, { entity_id: entityId }); | |||
Member
There was a problem hiding this comment.
we should return this promise so we can await until command is completed.
balloob
reviewed
Nov 20, 2018
|
|
||
| export const toggleEntity = (hass: HomeAssistant, entityId: string): void => { | ||
| const turnOn = STATES_OFF.includes(hass.states[entityId].state); | ||
| turnOnOffEntity(hass, entityId, turnOn); |
91eb02a to
939729c
Compare
balloob
reviewed
Nov 21, 2018
| * @appliesMixin LocalizeMixin | ||
| * @appliesMixin NavigateMixin | ||
| */ | ||
| class HuiPictureGlanceCard extends NavigateMixin( |
939729c to
91eb02a
Compare
91eb02a to
2359023
Compare
Member
Author
|
I don't have time right now to resolve this merge conflict. Will take a look tonight, hopefully. |
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.
Note: These changes are not really "testable" until we resolve the longPress directive issue that was introduced with the upgrading of lit-html