Skip to content
Snippets Groups Projects
Unverified Commit adfcbe90 authored by Yuval Aboulafia's avatar Yuval Aboulafia Committed by GitHub
Browse files

Make Jewish Calendar use DEVICE_CLASS_TIMSTAMP and remove timestamp attribute (#41397)

* Added "time" attribute

* Revert "Added "time" attribute"

This reverts commit 8adab9b78814aa1bc2adca242278e66ee9dd0b7f.

* Make DEVICE_CLASS use the DEVICE_CLASS_TIMESTAMP

* Removed unix timstamp attr

* keep attributes but delete the timestamp
parent a416a9e0
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ import logging
import hdate
from homeassistant.const import SUN_EVENT_SUNSET
from homeassistant.const import DEVICE_CLASS_TIMESTAMP, SUN_EVENT_SUNSET
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.sun import get_astral_event_date
import homeassistant.util.dt as dt_util
......@@ -150,7 +150,7 @@ class JewishCalendarTimeSensor(JewishCalendarSensor):
@property
def device_class(self):
"""Return the class of this sensor."""
return "timestamp"
return DEVICE_CLASS_TIMESTAMP
@property
def device_state_attributes(self):
......@@ -160,8 +160,6 @@ class JewishCalendarTimeSensor(JewishCalendarSensor):
if self._state is None:
return attrs
attrs["timestamp"] = self._state.timestamp()
return attrs
def get_state(self, daytime_date, after_shkia_date, after_tzais_date):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment