- updates to better support HA UI

This commit is contained in:
Jack Simbach 2021-09-05 22:25:18 -04:00
parent 9d2e738469
commit 1cbfe63268
3 changed files with 1 additions and 5 deletions

View File

@ -69,7 +69,7 @@ class GeErdEntity(GeEntity):
if self.erd_code_class == ErdCodeClass.NON_ZERO_TEMPERATURE: if self.erd_code_class == ErdCodeClass.NON_ZERO_TEMPERATURE:
return f"{value}" if value else "" return f"{value}" if value else ""
if self.erd_code_class == ErdCodeClass.TIMER or isinstance(value, timedelta): if self.erd_code_class == ErdCodeClass.TIMER or isinstance(value, timedelta):
return str(value)[:-3] if value else "" return str(value)[:-3] if value else "Off"
if value is None: if value is None:
return None return None
return self.appliance.stringify_erd_value(value, **kwargs) return self.appliance.stringify_erd_value(value, **kwargs)

View File

@ -114,8 +114,6 @@ class GeErdSensor(GeErdEntity, Entity):
return DEVICE_CLASS_POWER return DEVICE_CLASS_POWER
if self.erd_code_class == ErdCodeClass.ENERGY: if self.erd_code_class == ErdCodeClass.ENERGY:
return DEVICE_CLASS_ENERGY return DEVICE_CLASS_ENERGY
if self.erd_code_class == ErdCodeClass.TIMER:
return DEVICE_CLASS_TIMESTAMP
return None return None

View File

@ -7,7 +7,6 @@ set_timer:
entity: entity:
integration: "ge_home" integration: "ge_home"
domain: "sensor" domain: "sensor"
device_class: "timestamp"
fields: fields:
duration: duration:
name: Duration name: Duration
@ -28,4 +27,3 @@ clear_timer:
entity: entity:
integration: "ge_home" integration: "ge_home"
domain: "sensor" domain: "sensor"
device_class: "timestamp"