Skip to content

SPC: Fix recorder/history graph#17220

Merged
balloob merged 1 commit intohome-assistant:devfrom
mbrrg:spc_fix_recorder
Oct 7, 2018
Merged

SPC: Fix recorder/history graph#17220
balloob merged 1 commit intohome-assistant:devfrom
mbrrg:spc_fix_recorder

Conversation

@mbrrg
Copy link
Copy Markdown
Contributor

@mbrrg mbrrg commented Oct 7, 2018

Description:

Due to problems with non-serializable data passed to async_setup_platform the recorder component didn't want to play causing UI history graphs not to show for any entity when the SPC component was loaded.

Two tests no longer considered relevant have been removed.

Related issue (if applicable): fixes #16984

Checklist:

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

@balloob balloob added this to the 0.80 milestone Oct 7, 2018
@balloob
Copy link
Copy Markdown
Member

balloob commented Oct 7, 2018

Nice! Will include it in 0.80

@balloob balloob merged commit e922dd1 into home-assistant:dev Oct 7, 2018
@ghost ghost removed the in progress label Oct 7, 2018
Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

We don't want to be able to finish set up of the platforms from platform config sections.

async def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
"""Set up the SPC binary sensor."""
if (discovery_info is None or
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.

We should still guard from no discovery_info.

hass.async_create_task(discovery.async_load_platform(
hass, 'binary_sensor', DOMAIN,
{ATTR_DISCOVER_DEVICES: spc.zones.values()}, config))
hass, 'binary_sensor', DOMAIN))
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.

Send an empty dict as discovery_info.

balloob pushed a commit that referenced this pull request Oct 8, 2018
@balloob
Copy link
Copy Markdown
Member

balloob commented Oct 8, 2018

ugh was not paying attention . will put in a quick fix Martin

This was referenced Oct 8, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Feb 5, 2019
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.

SPC: -History graph do not work

4 participants