Skip to content

Commit

Permalink
Use generic format if platform is 'template'.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbkarlsson authored Jun 29, 2024
1 parent 7b7d43d commit 8c2b880
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/ev_smart_charging/helpers/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def get_platform(hass: HomeAssistant, entity_id: str):
entity_registry: EntityRegistry = async_entity_registry_get(hass)
entities = entity_registry.entities
entry: RegistryEntry = entities.get(entity_id)
if entry is None:
if entry is None or entry.platform == 'template':
return PLATFORM_GENERIC
platform = entry.platform
return platform

0 comments on commit 8c2b880

Please sign in to comment.