'Test setting the state with a template.'

def test_sensor_off(self):

    data = command_line.CommandSensorData('echo    0')
    entity = command_line.CommandBinarySensor(self.hass, data, 'test', None, '1', '0', None)
    entity.update()
    self.assertEqual(STATE_OFF, entity.state)
