-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #592 from contagon/webhook_trigger
Webhook Trigger
- Loading branch information
Showing
8 changed files
with
272 additions
and
12 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
"""Entity Classes""" | ||
"""Entity Classes.""" | ||
from homeassistant.const import STATE_UNKNOWN | ||
from homeassistant.helpers.restore_state import RestoreEntity | ||
from homeassistant.helpers.typing import StateType | ||
from homeassistant.const import STATE_UNKNOWN | ||
|
||
|
||
class PyscriptEntity(RestoreEntity): | ||
"""Generic Pyscript Entity""" | ||
"""Generic Pyscript Entity.""" | ||
|
||
_attr_extra_state_attributes: dict | ||
_attr_state: StateType = STATE_UNKNOWN | ||
|
||
def set_state(self, state): | ||
"""Set the state""" | ||
"""Set the state.""" | ||
self._attr_state = state | ||
|
||
def set_attributes(self, attributes): | ||
"""Set Attributes""" | ||
"""Set Attributes.""" | ||
self._attr_extra_state_attributes = attributes |
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
Oops, something went wrong.