Calling get_state will always result in a malformed entity_id error.
state = self.client.get_state(self._entity_id)
File "/usr/local/lib/python3.8/site-packages/homeassistant_api/client.py", line 207, in get_state
raise MalformedInputError(f"The entity_id, {entity_id!r}, is malformed")
homeassistant_api.errors.MalformedInputError: The entity_id, 'light.amirlight', is malformed
I have pinpointed the problem to be in the malformed_id function. https://github.com/GrandMoff100/HomeAssistantAPI/blob/master/homeassistant_api/client.py#L123
The 4th check here entity_id.lower() == entity_id will always evaluate to True, causing the malformed checker to return True.
This should be entity_id.lower() != entity_id imo.
The bug must be introduced in the latest version as it was working fine for me before.
Calling
get_statewill always result in a malformed entity_id error.I have pinpointed the problem to be in the
malformed_idfunction. https://github.com/GrandMoff100/HomeAssistantAPI/blob/master/homeassistant_api/client.py#L123The 4th check here
entity_id.lower() == entity_idwill always evaluate to True, causing the malformed checker to return True.This should be
entity_id.lower() != entity_idimo.The bug must be introduced in the latest version as it was working fine for me before.