'Constructor.
Args:
period (int): forecast period number
field (string): field name to use as value
wu_unit (string): "fahrenheit", "celsius", "degrees" etc.
see the example json at:
https://www.wunderground.com/weather/api/d/docs?d=data/forecast&MR=1
ha_unit (string): coresponding unit in home assistant
title (string): friendly_name of the sensor'

def __init__(self, friendly_name, period, field, wu_unit=None, ha_unit=None, icon=None):

    super().__init__(friendly_name=friendly_name, feature='forecast', value=((lambda wu: wu.data['forecast']['simpleforecast']['forecastday'][period][field][wu_unit]) if wu_unit else (lambda wu: wu.data['forecast']['simpleforecast']['forecastday'][period][field])), unit_of_measurement=ha_unit, entity_picture=(lambda wu: (wu.data['forecast']['simpleforecast']['forecastday'][period]['icon_url'] if (not icon) else None)), icon=icon, device_state_attributes={'date': (lambda wu: wu.data['forecast']['simpleforecast']['forecastday'][period]['date']['pretty'])})
