Why does the entity I created not display log entries
my entity
async def async_setup_platform(hass,
config,
async_add_devices,
discovery_info=None):
_LOGGER.info("Successfully loaded.....")
_my_entity = anysctestEntity("binary_sensor.00145442hmkh")
creat_entiy = [_my_entity]
async_add_devices(creat_entiy)
async def _get_data(now):
await _my_entity._update_status()
async_call_later(hass, 6, _get_data)
async_call_later(hass, 6, _get_data)
class anysctestEntity(BinarySensorEntity):
def __init__(self, unique_id):
self._unique_id = unique_id
self._status = False
@property
def name(self):
return self._unique_id
@property
def unique_id(self):
return self._unique_id
@property
def is_on(self):
return self._status
@property
def device_state_attributes(self):
return {"aa": "bb", "cc": "dd", "dd": "bb"}
@property
def should_poll(self):
return False
@property
def device_class(self):
return "motion"
async def _update_status(self):
self._status = not self._status
_LOGGER.info("status:%s" % self._status)
self.async_write_ha_state()