Skip to content

Fix BOM weather '-' value#14042

Merged
balloob merged 1 commit intohome-assistant:devfrom
nickw444:nwhyte/bom-weather-improvement
May 8, 2018
Merged

Fix BOM weather '-' value#14042
balloob merged 1 commit intohome-assistant:devfrom
nickw444:nwhyte/bom-weather-improvement

Conversation

@nickw444
Copy link
Copy Markdown
Contributor

@nickw444 nickw444 commented Apr 22, 2018

Description:

BOM weather only provide forecast data every few updates, so the state usually looks like the following:

image

With occasional data along the way

image

This PR uses the historical data to show the last, non - value for the weather sensor to fix this issue for weather only.

Example entry for configuration.yaml (if applicable):

weather:
  - platform: bom
    station: IDN60901.94767
sensor:
  - platform: bom
    station: IDN60901.94767
    name: Sydney
    monitored_conditions:
      - apparent_t
      - cloud
      - cloud_base_m
      - cloud_oktas
      - cloud_type_id
      - cloud_type
      - delta_t
      - gust_kmh
      - gust_kt
      - air_temp
      - dewpt
      - press
      - press_qnh
      - press_msl
      - press_tend
      - rain_trace
      - rel_hum
      - sea_state
      - swell_dir_worded
      - swell_height
      - swell_period
      - vis_km
      - weather
      - wind_dir
      - wind_spd_kmh
      - wind_spd_kt

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

If the code communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

Comment thread tests/components/sensor/test_bom.py Outdated

self.assertEqual('Fine', self.hass.states.get(f'sensor.bom_fake_weather').state)
self.assertEqual('1021.7', self.hass.states.get(f'sensor.bom_fake_pressure_mb').state)
self.assertEqual('25.0', self.hass.states.get(f'sensor.bom_fake_feels_like_c').state)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (93 > 79 characters)

Comment thread tests/components/sensor/test_bom.py Outdated
self.hass, sensor.DOMAIN, {'sensor': VALID_CONFIG}))

self.assertEqual('Fine', self.hass.states.get(f'sensor.bom_fake_weather').state)
self.assertEqual('1021.7', self.hass.states.get(f'sensor.bom_fake_pressure_mb').state)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (94 > 79 characters)

Comment thread tests/components/sensor/test_bom.py Outdated
self.assertTrue(setup_component(
self.hass, sensor.DOMAIN, {'sensor': VALID_CONFIG}))

self.assertEqual('Fine', self.hass.states.get(f'sensor.bom_fake_weather').state)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (88 > 79 characters)

Comment thread tests/components/sensor/test_bom.py Outdated
self.assertTrue(setup_component(self.hass, sensor.DOMAIN, {
'sensor': VALID_CONFIG}))

fake_entities = ['bom_fake_feels_like_c', 'bom_fake_pressure_mb', 'bom_fake_weather']
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (93 > 79 characters)

Comment thread tests/components/sensor/test_bom.py Outdated
from homeassistant.setup import setup_component
from homeassistant.components import sensor

from tests.common import (get_test_home_assistant, assert_setup_component, load_fixture)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (88 > 79 characters)

Comment thread homeassistant/components/sensor/bom.py Outdated
item_filter = lambda x: True
if condition in ['weather', 'sea_state']:
# Take the first non '-' reading.
item_filter = lambda x: x is not None and x != '-'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not assign a lambda expression, use a def

Comment thread homeassistant/components/sensor/bom.py Outdated
Iterators are used in this method to avoid iterating needlessly
iterating through the entire BOM provided dataset
"""
item_filter = lambda x: True
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not assign a lambda expression, use a def

Comment thread homeassistant/components/sensor/bom.py Outdated
@property
def latest_data(self):
"""Return the latest data object"""
if self._data and len(self._data) > 0:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second condition len(self._data) is unnecessary here, because if self._data already checks for a "truthy" value. If self._data is None or is an empty list, then if self._data will already evaluate to False.

Comment thread homeassistant/components/sensor/bom.py Outdated
if self.rest.data and self._condition in self.rest.data:
return self.rest.data[self._condition]
reading = self.rest.get_reading(self._condition)
if reading is not None and reading != '-':
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I think the latter condition here reading != '-' is unnecessary because get_reading already checks for '-' values for the weather condition. I would suggest removing it here to avoid having the same logic in multiple places which could eventually lead to bugs.
  2. You can just return reading here without the None check. When entity.state returns None it is automatically converted to an unknown state. In fact, it's even recommended to indicate an unknown state with a None value and returning STATE_UNKNOWN is not recommended.

Copy link
Copy Markdown
Contributor Author

@nickw444 nickw444 Apr 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_reading already checks for '-' values for the weather condition.

Yep, for the weather condition, but it also exists for other conditions like cloud_type , which sometimes will sometimes be - because there are no clouds (so using a historical value isn't right) (and Unknown should be the value shown in the frontend)

See: http://www.bom.gov.au/fwo/IDN60901/IDN60901.94767.json

Do you think this case should also be handled in BOMCurrentData.get_reading (i.e. BOMCurrentData will do the conversion of '-' to None?


As an aside, I will update the STATE_UNKNOWN to return None instead.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes then I would move that logic into get_reading.

Comment thread homeassistant/components/sensor/bom.py Outdated
return True

condition_readings = (entry[condition] for entry in self._data)
latest_reading = next((x for x in condition_readings if item_filter(x)), None)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (86 > 79 characters)

@balloob
Copy link
Copy Markdown
Member

balloob commented Apr 22, 2018

Shouldn't we just delay our scan interval so that there is always a reading?

@nickw444
Copy link
Copy Markdown
Contributor Author

nickw444 commented Apr 22, 2018

Shouldn't we just delay our scan interval so that there is always a reading?

I don't think that's an ideal solution. The time frame between each "real" reading is about 3 hours, so 3 hour old weather data isn't very useful for the other conditions.

image

Also, whilst it appears BOM give data every 3 hours between 3:14 and 3:44 (and subsequently every 3 hours after that, there doesn't seem to be any "contract" that documents this, and thus if BOM were to change their frequency, or perhaps started issuing weather forecasts more frequently or at a different time offset, it would break this implementation, so I don't think it's a viable approach.

@balloob
Copy link
Copy Markdown
Member

balloob commented Apr 23, 2018

But we can be a bit smarter though? The moment we get a proper reading we will not do another update for 3 hours?

@nickw444
Copy link
Copy Markdown
Contributor Author

The moment we get a proper reading we will not do another update for 3 hours?

Yes we could do that, but:

1. What if BOM changes the update interval?

Yes, it's unlikely, so probably not a huge issue, but say they take 3 hours and 15 minutes to provide new data, what happens at the refresh we do at the 3 hour mark when there still is no valid data? Do we wait for another 3 hours and expect valid data to come in? What if it never comes in? Do we revert to checking at a higher frequency? It seems like there would be a few edge cases around timing that would need to be handled (and IMO quite complex to deal with)

2. What about other conditions like current temperature?

If we want to keep updating these at a higher frequency, (which we would, since BOM provide higher frequency measurements for these properties), then we need to consider the weather condition as a special snowflake in regards to refresh time. Something that doesn't sound too easy to keep maintainable.

@nickw444
Copy link
Copy Markdown
Contributor Author

Hey @balloob @OttoWinter any update on this?

Copy link
Copy Markdown
Member

@OttoWinter OttoWinter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As one API call updates several conditions and some condition have a higher update frequency, I agree we shouldn't set the global update interval to 3 hours.

Comment thread homeassistant/components/sensor/bom.py Outdated
@@ -202,13 +234,13 @@ def update(self):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really part of this PR, but in the if statement above we check if the last update was within 35 minutes.

Can't we just set MIN_TIME_BETWEEN_UPDATES to 35 minutes? The Throttle should take care of it. I'm a bit confused.

Copy link
Copy Markdown
Contributor Author

@nickw444 nickw444 May 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me I'll raise another PR

Comment thread homeassistant/components/sensor/bom.py Outdated
latest_reading = next(
(x for x in condition_readings if should_include_value(x)), None)
if latest_reading == '-':
# Show a unknown state if a '-' value is encountered.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's weird that - values in the state are handled differently for weather conditions than for other conditions. Shouldn't we just always take the first non - value?

Like this:

condition_readings = (entry[condition] for entry in self._data)
return next((x for x in condition_readings if x != '-'), None)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can. I was under the impression that weather was some special case, but it looks like I can't see why this would negatively impact other conditions, like cloud.

I had a look through the data paying attentions to cloud and weather to see if we could take this approach, and it looks like it'd be fine to do.

Also, it seems my previous assumption about weather being updated only every 3 hours is incorrect - there are some extra readings in there where it looks like the condition changed prematurely, so this is good reason to forego the update interval change.

{"local_date_time":"02/07:00am","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"02/06:30am","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"02/06:00am","weather":"Fine","cloud":"Mostly cloudy","cloud_base_m":2500,"cloud_oktas":7,"cloud_type_id":30,"cloud_type":"-"}
{"local_date_time":"02/05:30am","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"02/05:00am","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"02/04:30am","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"02/04:00am","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"02/03:30am","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"02/03:00am","weather":"Fine","cloud":"Mostly cloudy","cloud_base_m":2500,"cloud_oktas":6,"cloud_type_id":30,"cloud_type":"-"}
{"local_date_time":"02/02:30am","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"02/02:00am","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"02/01:30am","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"02/01:00am","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"02/12:30am","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"02/12:00am","weather":"Fine","cloud":"Mostly cloudy","cloud_base_m":2500,"cloud_oktas":7,"cloud_type_id":30,"cloud_type":"-"}
{"local_date_time":"01/11:30pm","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/11:00pm","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/10:30pm","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/10:00pm","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/09:30pm","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/09:00pm","weather":"Fine","cloud":"Partly cloudy","cloud_base_m":2500,"cloud_oktas":4,"cloud_type_id":30,"cloud_type":"-"}
{"local_date_time":"01/08:30pm","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/08:00pm","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/07:30pm","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/07:00pm","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/06:30pm","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/06:00pm","weather":"Fine","cloud":"Mostly clear","cloud_base_m":2500,"cloud_oktas":1,"cloud_type_id":30,"cloud_type":"-"}
{"local_date_time":"01/05:30pm","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/05:00pm","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/04:30pm","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/04:00pm","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/03:30pm","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/03:00pm","weather":"Fine","cloud":"Mostly clear","cloud_base_m":2500,"cloud_oktas":1,"cloud_type_id":30,"cloud_type":"-"}
{"local_date_time":"01/02:30pm","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/02:00pm","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/01:30pm","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/01:00pm","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/12:30pm","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/12:00pm","weather":"Fine","cloud":"Mostly clear","cloud_base_m":2500,"cloud_oktas":1,"cloud_type_id":30,"cloud_type":"-"}
{"local_date_time":"01/11:30am","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/11:00am","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/10:30am","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/10:00am","weather":"-","cloud":"Mostly clear","cloud_base_m":1020,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"01/09:30am","weather":"-","cloud":"Mostly clear","cloud_base_m":960,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"01/09:00am","weather":"Fine","cloud":"Mostly clear","cloud_base_m":600,"cloud_oktas":2,"cloud_type_id":31,"cloud_type":"-"}
{"local_date_time":"01/08:30am","weather":"-","cloud":"Mostly clear","cloud_base_m":750,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"01/08:00am","weather":"-","cloud":"Mostly clear","cloud_base_m":720,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"01/07:30am","weather":"-","cloud":"Mostly clear","cloud_base_m":660,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"01/07:00am","weather":"-","cloud":"Mostly clear","cloud_base_m":660,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"01/06:30am","weather":"-","cloud":"Mostly clear","cloud_base_m":660,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"01/06:00am","weather":"Fine","cloud":"Mostly clear","cloud_base_m":600,"cloud_oktas":1,"cloud_type_id":31,"cloud_type":"-"}
{"local_date_time":"01/05:30am","weather":"-","cloud":"Mostly clear","cloud_base_m":600,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"01/05:00am","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/04:30am","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/04:00am","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/03:30am","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/03:00am","weather":"Fine","cloud":"Clear","cloud_base_m":2500,"cloud_oktas":0,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/02:30am","weather":"-","cloud":"-","cloud_base_m":null,"cloud_oktas":null,"cloud_type_id":null,"cloud_type":"-"}
{"local_date_time":"01/02:00am","weather":"-","cloud":"Mostly clear","cloud_base_m":600,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"01/01:30am","weather":"-","cloud":"Mostly clear","cloud_base_m":600,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"01/01:00am","weather":"-","cloud":"Mostly clear","cloud_base_m":600,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"01/12:30am","weather":"-","cloud":"Mostly clear","cloud_base_m":600,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"01/12:00am","weather":"Fine","cloud":"Mostly clear","cloud_base_m":600,"cloud_oktas":1,"cloud_type_id":31,"cloud_type":"-"}
{"local_date_time":"30/11:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":600,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/11:00pm","weather":"-","cloud":"Mostly clear","cloud_base_m":600,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/10:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":600,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/10:00pm","weather":"-","cloud":"Mostly clear","cloud_base_m":600,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/09:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":600,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/09:00pm","weather":"Fine","cloud":"Mostly clear","cloud_base_m":600,"cloud_oktas":1,"cloud_type_id":31,"cloud_type":"-"}
{"local_date_time":"30/08:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":600,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/08:00pm","weather":"-","cloud":"Mostly clear","cloud_base_m":600,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/07:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":540,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/07:00pm","weather":"-","cloud":"Mostly clear","cloud_base_m":540,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/06:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":540,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/06:00pm","weather":"Distant precip.","cloud":"Mostly clear","cloud_base_m":300,"cloud_oktas":1,"cloud_type_id":38,"cloud_type":"-"}
{"local_date_time":"30/05:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":540,"cloud_oktas":1,"cloud_type_id":7,"cloud_type":"Stratus"}
{"local_date_time":"30/05:00pm","weather":"-","cloud":"Mostly clear","cloud_base_m":540,"cloud_oktas":1,"cloud_type_id":7,"cloud_type":"Stratus"}
{"local_date_time":"30/04:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":540,"cloud_oktas":1,"cloud_type_id":7,"cloud_type":"Stratus"}
{"local_date_time":"30/04:00pm","weather":"-","cloud":"Mostly clear","cloud_base_m":750,"cloud_oktas":2,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/03:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":540,"cloud_oktas":1,"cloud_type_id":7,"cloud_type":"Stratus"}
{"local_date_time":"30/03:00pm","weather":"Distant precip.","cloud":"Partly cloudy","cloud_base_m":600,"cloud_oktas":5,"cloud_type_id":38,"cloud_type":"-"}
{"local_date_time":"30/02:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":750,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/02:00pm","weather":"-","cloud":"Mostly clear","cloud_base_m":750,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/01:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":660,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/01:00pm","weather":"-","cloud":"Mostly clear","cloud_base_m":660,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/12:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":660,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/12:00pm","weather":"Distant precip.","cloud":"Partly cloudy","cloud_base_m":600,"cloud_oktas":5,"cloud_type_id":38,"cloud_type":"-"}
{"local_date_time":"30/11:30am","weather":"-","cloud":"Partly cloudy","cloud_base_m":810,"cloud_oktas":3,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/11:00am","weather":"-","cloud":"Partly cloudy","cloud_base_m":810,"cloud_oktas":3,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/10:30am","weather":"-","cloud":"Mostly clear","cloud_base_m":750,"cloud_oktas":2,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/10:00am","weather":"-","cloud":"Mostly clear","cloud_base_m":450,"cloud_oktas":1,"cloud_type_id":7,"cloud_type":"Stratus"}
{"local_date_time":"30/09:30am","weather":"-","cloud":"Partly cloudy","cloud_base_m":810,"cloud_oktas":3,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/09:00am","weather":"Distant precip.","cloud":"Partly cloudy","cloud_base_m":600,"cloud_oktas":4,"cloud_type_id":38,"cloud_type":"-"}
{"local_date_time":"30/08:30am","weather":"-","cloud":"Mostly clear","cloud_base_m":450,"cloud_oktas":1,"cloud_type_id":7,"cloud_type":"Stratus"}
{"local_date_time":"30/08:00am","weather":"-","cloud":"Mostly clear","cloud_base_m":450,"cloud_oktas":1,"cloud_type_id":7,"cloud_type":"Stratus"}
{"local_date_time":"30/07:30am","weather":"Showers","cloud":"Mostly clear","cloud_base_m":450,"cloud_oktas":1,"cloud_type_id":7,"cloud_type":"Stratus"}
{"local_date_time":"30/07:00am","weather":"-","cloud":"Mostly clear","cloud_base_m":540,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/06:30am","weather":"-","cloud":"Mostly clear","cloud_base_m":540,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/06:00am","weather":"Distant precip.","cloud":"Partly cloudy","cloud_base_m":300,"cloud_oktas":3,"cloud_type_id":38,"cloud_type":"-"}
{"local_date_time":"30/05:30am","weather":"-","cloud":"Mostly clear","cloud_base_m":540,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/05:00am","weather":"-","cloud":"Mostly clear","cloud_base_m":540,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/04:30am","weather":"-","cloud":"Mostly clear","cloud_base_m":600,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/04:00am","weather":"-","cloud":"Mostly clear","cloud_base_m":360,"cloud_oktas":1,"cloud_type_id":7,"cloud_type":"Stratus"}
{"local_date_time":"30/03:30am","weather":"-","cloud":"Mostly clear","cloud_base_m":720,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/03:00am","weather":"Recent precip.","cloud":"Partly cloudy","cloud_base_m":300,"cloud_oktas":5,"cloud_type_id":38,"cloud_type":"-"}
{"local_date_time":"30/02:30am","weather":"Showers","cloud":"Mostly clear","cloud_base_m":360,"cloud_oktas":1,"cloud_type_id":7,"cloud_type":"Stratus"}
{"local_date_time":"30/02:20am","weather":"Showers","cloud":"Mostly clear","cloud_base_m":360,"cloud_oktas":1,"cloud_type_id":7,"cloud_type":"Stratus"}
{"local_date_time":"30/02:00am","weather":"-","cloud":"Mostly clear","cloud_base_m":360,"cloud_oktas":1,"cloud_type_id":7,"cloud_type":"Stratus"}
{"local_date_time":"30/01:30am","weather":"-","cloud":"Mostly clear","cloud_base_m":840,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/01:00am","weather":"-","cloud":"Mostly clear","cloud_base_m":450,"cloud_oktas":1,"cloud_type_id":7,"cloud_type":"Stratus"}
{"local_date_time":"30/12:30am","weather":"-","cloud":"Mostly clear","cloud_base_m":840,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"30/12:00am","weather":"Recent precip.","cloud":"Mostly cloudy","cloud_base_m":600,"cloud_oktas":7,"cloud_type_id":38,"cloud_type":"-"}
{"local_date_time":"29/11:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":750,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/11:00pm","weather":"-","cloud":"Mostly clear","cloud_base_m":840,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/10:30pm","weather":"Thunder","cloud":"Mostly clear","cloud_base_m":360,"cloud_oktas":1,"cloud_type_id":7,"cloud_type":"Stratus"}
{"local_date_time":"29/10:15pm","weather":"Thunderstorm","cloud":"Mostly clear","cloud_base_m":360,"cloud_oktas":1,"cloud_type_id":7,"cloud_type":"Stratus"}
{"local_date_time":"29/10:00pm","weather":"-","cloud":"Mostly clear","cloud_base_m":360,"cloud_oktas":1,"cloud_type_id":7,"cloud_type":"Stratus"}
{"local_date_time":"29/09:53pm","weather":"Showers","cloud":"Mostly clear","cloud_base_m":450,"cloud_oktas":1,"cloud_type_id":7,"cloud_type":"Stratus"}
{"local_date_time":"29/09:30pm","weather":"Showers","cloud":"Mostly clear","cloud_base_m":300,"cloud_oktas":2,"cloud_type_id":7,"cloud_type":"Stratus"}
{"local_date_time":"29/09:00pm","weather":"Thunderstorm","cloud":"Mostly cloudy","cloud_base_m":300,"cloud_oktas":7,"cloud_type_id":39,"cloud_type":"-"}
{"local_date_time":"29/08:53pm","weather":"Thunderstorm","cloud":"Mostly clear","cloud_base_m":450,"cloud_oktas":1,"cloud_type_id":7,"cloud_type":"Stratus"}
{"local_date_time":"29/08:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":780,"cloud_oktas":2,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/08:00pm","weather":"-","cloud":"Mostly clear","cloud_base_m":750,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/07:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":750,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/07:00pm","weather":"-","cloud":"Mostly clear","cloud_base_m":750,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/06:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":750,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/06:00pm","weather":"Distant precip.","cloud":"Mostly clear","cloud_base_m":600,"cloud_oktas":2,"cloud_type_id":38,"cloud_type":"-"}
{"local_date_time":"29/05:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":750,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/05:00pm","weather":"-","cloud":"Mostly clear","cloud_base_m":900,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/04:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":750,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/04:00pm","weather":"-","cloud":"Mostly clear","cloud_base_m":900,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/03:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":900,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/03:00pm","weather":"Fine","cloud":"Mostly cloudy","cloud_base_m":600,"cloud_oktas":7,"cloud_type_id":38,"cloud_type":"-"}
{"local_date_time":"29/02:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":900,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/02:00pm","weather":"-","cloud":"Mostly clear","cloud_base_m":900,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/01:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":900,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/01:00pm","weather":"-","cloud":"Mostly clear","cloud_base_m":900,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/12:30pm","weather":"-","cloud":"Mostly clear","cloud_base_m":900,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/12:00pm","weather":"Fine","cloud":"Mostly cloudy","cloud_base_m":600,"cloud_oktas":6,"cloud_type_id":38,"cloud_type":"-"}
{"local_date_time":"29/11:30am","weather":"-","cloud":"Mostly clear","cloud_base_m":900,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/11:00am","weather":"-","cloud":"Mostly clear","cloud_base_m":900,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/10:36am","weather":"-","cloud":"Mostly clear","cloud_base_m":900,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/10:30am","weather":"-","cloud":"Mostly clear","cloud_base_m":900,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/10:00am","weather":"-","cloud":"Mostly clear","cloud_base_m":900,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/09:30am","weather":"-","cloud":"Mostly clear","cloud_base_m":750,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/09:00am","weather":"Fine","cloud":"Partly cloudy","cloud_base_m":600,"cloud_oktas":3,"cloud_type_id":38,"cloud_type":"-"}
{"local_date_time":"29/08:30am","weather":"-","cloud":"Mostly clear","cloud_base_m":750,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/08:00am","weather":"-","cloud":"Mostly clear","cloud_base_m":750,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}
{"local_date_time":"29/07:30am","weather":"Showers","cloud":"Mostly clear","cloud_base_m":750,"cloud_oktas":1,"cloud_type_id":8,"cloud_type":"Cumulus"}

@nickw444 nickw444 force-pushed the nwhyte/bom-weather-improvement branch from 5440b2e to 2f6b1ed Compare May 1, 2018 21:56
@nickw444 nickw444 mentioned this pull request May 1, 2018
2 tasks
@nickw444 nickw444 force-pushed the nwhyte/bom-weather-improvement branch from 2f6b1ed to 87fbc7e Compare May 8, 2018 07:17
Comment thread homeassistant/components/weather/bom.py Outdated
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (81 > 79 characters)

@nickw444 nickw444 force-pushed the nwhyte/bom-weather-improvement branch from 87fbc7e to cd238bf Compare May 8, 2018 07:20
@nickw444
Copy link
Copy Markdown
Contributor Author

nickw444 commented May 8, 2018

Hey @OttoWinter changes are up, and I rebased onto dev.

@balloob balloob merged commit e12994a into home-assistant:dev May 8, 2018
@balloob balloob mentioned this pull request May 28, 2018
girlpunk pushed a commit to girlpunk/home-assistant that referenced this pull request Sep 4, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Sep 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants