generated from ludeeus/integration_blueprint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Cleanup unused files - Rename last blueprint remains
- Loading branch information
Showing
9 changed files
with
55 additions
and
149 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
This file was deleted.
Oops, something went wrong.
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,10 +1,13 @@ | ||
"""Constants for crisp.""" | ||
|
||
from logging import Logger, getLogger | ||
|
||
LOGGER: Logger = getLogger(__package__) | ||
|
||
NAME = "Crisp" | ||
DOMAIN = "crisp" | ||
VERSION = "1.0.0" | ||
# TODO | ||
ATTRIBUTION = "Data provided by http://jsonplaceholder.typicode.com/" | ||
ATTRIBUTION = "Data provided by Crisp" | ||
|
||
# Sensor entity id keys | ||
SENSOR_TOTAL_ORDER_COUNT = "total_order_count" |
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,25 +1,27 @@ | ||
"""BlueprintEntity class.""" | ||
"""CrispEntity class.""" | ||
|
||
from __future__ import annotations | ||
|
||
from homeassistant.helpers.entity import DeviceInfo | ||
from homeassistant.helpers.update_coordinator import CoordinatorEntity | ||
|
||
from .const import ATTRIBUTION, DOMAIN, NAME, VERSION | ||
from .coordinator import BlueprintDataUpdateCoordinator | ||
from .const import DOMAIN, NAME, VERSION, ATTRIBUTION | ||
from .coordinator import CrispDataUpdateCoordinator | ||
|
||
|
||
class IntegrationBlueprintEntity(CoordinatorEntity): | ||
"""BlueprintEntity class.""" | ||
class CrispEntity(CoordinatorEntity): | ||
"""Crisp entity class.""" | ||
|
||
_attr_has_entity_name = True | ||
_attr_attribution = ATTRIBUTION | ||
|
||
def __init__(self, coordinator: BlueprintDataUpdateCoordinator) -> None: | ||
def __init__(self, coordinator: CrispDataUpdateCoordinator) -> None: | ||
"""Initialize.""" | ||
super().__init__(coordinator) | ||
|
||
self._attr_unique_id = coordinator.config_entry.entry_id | ||
self._attr_device_info = DeviceInfo( | ||
identifiers={(DOMAIN, self.unique_id)}, | ||
name=NAME, | ||
model=VERSION, | ||
manufacturer=NAME, | ||
) |
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 was deleted.
Oops, something went wrong.