コード例 #1
0
ファイル: conftest.py プロジェクト: TheZoker/home-assistant
 def _factory(device_id,
              event_type="DEVICE_EVENT",
              capability='',
              attribute='Updated',
              value='Value',
              data=None):
     event = Mock()
     event.event_type = event_type
     event.device_id = device_id
     event.component_id = 'main'
     event.capability = capability
     event.attribute = attribute
     event.value = value
     event.data = data
     event.location_id = str(uuid4())
     return event
コード例 #2
0
 def _factory(
     device_id,
     event_type="DEVICE_EVENT",
     capability="",
     attribute="Updated",
     value="Value",
     data=None,
 ):
     event = Mock()
     event.event_type = event_type
     event.device_id = device_id
     event.component_id = "main"
     event.capability = capability
     event.attribute = attribute
     event.value = value
     event.data = data
     event.location_id = str(uuid4())
     return event