diff --git a/homeassistant/components/ambient_station/sensor.py b/homeassistant/components/ambient_station/sensor.py index 6dc79cec326..c400d2ec97b 100644 --- a/homeassistant/components/ambient_station/sensor.py +++ b/homeassistant/components/ambient_station/sensor.py @@ -83,7 +83,11 @@ class AmbientWeatherSensor(AmbientWeatherEntity): w_m2_brightness_val = self._ambient.stations[self._mac_address][ ATTR_LAST_DATA ].get(TYPE_SOLARRADIATION) - self._state = round(float(w_m2_brightness_val) / 0.0079) + + if w_m2_brightness_val is None: + self._state = None + else: + self._state = round(float(w_m2_brightness_val) / 0.0079) else: self._state = self._ambient.stations[self._mac_address][ATTR_LAST_DATA].get( self._sensor_type