def get_skill_state(name, device_skill_state) ->dict:
    """Find a skill entry in the device skill state and returns it."""
    skill_state_return = {}
    for skill_state in device_skill_state.get('skills', []):
        if skill_state.get('name') == name:
            skill_state_return = skill_state
    return skill_state_return
