Skip to content

Guard against older pysma, #18099 checked only for no pysma#18278

Merged
kellerza merged 1 commit intohome-assistant:devfrom
kellerza:smafix2
Nov 7, 2018
Merged

Guard against older pysma, #18099 checked only for no pysma#18278
kellerza merged 1 commit intohome-assistant:devfrom
kellerza:smafix2

Conversation

@kellerza
Copy link
Copy Markdown
Member

@kellerza kellerza commented Nov 6, 2018

Description:

Guard against older pysma, #18099 checked only for no pysma

pysma.SENSORS introduced in the latest library, allows to only specify sensors in one place and not duplicate in hass component.

Reported on discord, even after 0.82.b2:

File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/sensor/sma.py", line 44, in _check_sensor_schema
    valid.extend([s.name for s in pysma.SENSORS])
AttributeError: module 'pysma' has no attribute 'SENSORS'
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/sensor/sma.py", line 44, in _check_sensor_schema
    valid.extend([s.name for s in pysma.SENSORS])

Example entry for configuration.yaml (if applicable):

sensor:
  - platorm: sma

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

@ghost ghost assigned kellerza Nov 6, 2018
@ghost ghost added the in progress label Nov 6, 2018
@kellerza kellerza added this to the 0.82.0b3 milestone Nov 6, 2018
@balloob balloob modified the milestones: 0.82.0b3, 0.82 Nov 6, 2018
@kellerza kellerza merged commit 35ae85e into home-assistant:dev Nov 7, 2018
@ghost ghost removed the in progress label Nov 7, 2018
@kellerza kellerza deleted the smafix2 branch November 7, 2018 06:53
balloob pushed a commit that referenced this pull request Nov 7, 2018
@balloob balloob mentioned this pull request Nov 9, 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.

3 participants