Context (#15674)
* Add context * Add context to switch/light services * Test set_state API * Lint * Fix tests * Do not include context yet in comparison * Do not pass in loop * Fix Z-Wave tests * Add websocket test without user
This commit is contained in:
1 parent
867f80715e
commit
c7f4bdafc0
16 files changed
+363
-109
No files matched your search
@@ -104,12 +104,14 @@ class TestMqttEventStream:
|
||||
"state": "on",
|
||||
"entity_id": e_id,
|
||||
"attributes": {},
|
||||
"last_changed": now.isoformat()
|
||||
"last_changed": now.isoformat(),
|
||||
}
|
||||
event['event_data'] = {"new_state": new_state, "entity_id": e_id}
|
||||
|
||||
# Verify that the message received was that expected
|
||||
assert json.loads(msg) == event
|
||||
result = json.loads(msg)
|
||||
result['event_data']['new_state'].pop('context')
|
||||
assert result == event
|
||||
|
||||
@patch('homeassistant.components.mqtt.async_publish')
|
||||
def test_time_event_does_not_send_message(self, mock_pub):
|
||||
|
||||
Reference in new issue
Block a user