def test_serialize_input_boolean():
    """Test serializing an input boolean entity."""
    state = State('input_boolean.bla', 'on')
    entity = sh._GoogleEntity(None, BASIC_CONFIG, state)
    assert entity.sync_serialize() == {
        'id': 'input_boolean.bla',
        'attributes': {},
        'name': {'name': 'bla'},
        'traits': ['action.devices.traits.OnOff'],
        'type': 'action.devices.types.SWITCH',
        'willReportState': False,
    }
def test_serialize_input_boolean():
    """Test serializing an input boolean entity."""
    state = State('input_boolean.bla', 'on')
    entity = sh._GoogleEntity(None, BASIC_CONFIG, state)
    assert entity.sync_serialize() == {
        'id': 'input_boolean.bla',
        'attributes': {},
        'name': {'name': 'bla'},
        'traits': ['action.devices.traits.OnOff'],
        'type': 'action.devices.types.SWITCH',
        'willReportState': False,
    }
示例#3
0
async def test_serialize_input_boolean(hass):
    """Test serializing an input boolean entity."""
    state = State('input_boolean.bla', 'on')
    # pylint: disable=protected-access
    entity = sh._GoogleEntity(hass, BASIC_CONFIG, state)
    result = await entity.sync_serialize()
    assert result == {
        'id': 'input_boolean.bla',
        'attributes': {},
        'name': {'name': 'bla'},
        'traits': ['action.devices.traits.OnOff'],
        'type': 'action.devices.types.SWITCH',
        'willReportState': False,
    }
示例#4
0
async def test_serialize_input_boolean(hass):
    """Test serializing an input boolean entity."""
    state = State('input_boolean.bla', 'on')
    # pylint: disable=protected-access
    entity = sh._GoogleEntity(hass, BASIC_CONFIG, state)
    result = await entity.sync_serialize()
    assert result == {
        'id': 'input_boolean.bla',
        'attributes': {},
        'name': {'name': 'bla'},
        'traits': ['action.devices.traits.OnOff'],
        'type': 'action.devices.types.SWITCH',
        'willReportState': False,
    }