Home Assistant Git Exporter

This commit is contained in:
root
2024-08-09 06:45:02 +02:00
parent 60abdd866c
commit 80fc630f5e
624 changed files with 27739 additions and 4497 deletions

View File

@@ -0,0 +1,19 @@
"""Entity Classes."""
from homeassistant.const import STATE_UNKNOWN
from homeassistant.helpers.restore_state import RestoreEntity
from homeassistant.helpers.typing import StateType
class PyscriptEntity(RestoreEntity):
"""Generic Pyscript Entity."""
_attr_extra_state_attributes: dict
_attr_state: StateType = STATE_UNKNOWN
def set_state(self, state):
"""Set the state."""
self._attr_state = state
def set_attributes(self, attributes):
"""Set Attributes."""
self._attr_extra_state_attributes = attributes