@classmethod<EOL><INDENT>def from_json(cls, data):<DEDENT>
<EOL>required_keys = ('<STR_LIT>', '<STR_LIT>')<EOL>optional_keys = {'<STR_LIT>': <NUM_LIT>,<EOL>'<STR_LIT>': '<STR_LIT>', '<STR_LIT>': '<STR_LIT>'}<EOL>for key in required_keys:<EOL><INDENT>assert key in data, '<STR_LIT>'.format(key)<EOL><DEDENT>for key, val in optional_keys.items():<EOL><INDENT>if key not in data:<EOL><INDENT>data[key] = val<EOL><DEDENT><DEDENT>return cls(data['<STR_LIT>'], data['<STR_LIT>'], data['<STR_LIT>'],<EOL>data['<STR_LIT>'], data['<STR_LIT>'])<EOL>
Create a Humidity Condition from a dictionary.

        Args:
            data = {
            "hum_type": string,
            "hum_value": float,
            "barometric_pressure": float,
            "schedule": string,
            "wet_bulb_range": string}