8000 SPC: Fix recorder/history graph by mbrrg · Pull Request #17220 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

SPC: Fix recorder/history graph #17220 8000

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 7, 2018
Merged

Conversation

mbrrg
Copy link
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
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
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.

@@ -27,13 +26,10 @@ def _get_device_class(zone_type):
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
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.

@@ -66,13 +63,11 @@

# add sensor devices for each zone (typically motion/fire/door sensors)
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
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
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
0