'Set the value of a state field.
For boolean states, the values True, \'true\', \'1\', \'on\',
and \'yes\' are accepted as True; all others are False.
Arguments:
key   -- The state field to modify.
value -- The new value of the state field.'

def __setitem__(self, key, value):

    if (key in self._state):
        if (key in ['name', 'subscription', 'groups']):
            self._state[key] = value
        else:
            value = str(value).lower()
            self._state[key] = (value in ('true', '1', 'on', 'yes'))
    else:
        raise KeyError
