Skip to content

Fix sensor.cpuspeed inside docker container (#20614)#20656

Merged
fabaff merged 1 commit into
home-assistant:devfrom
rohankapoorcom:fix-cpuspeed
Feb 1, 2019
Merged

Fix sensor.cpuspeed inside docker container (#20614)#20656
fabaff merged 1 commit into
home-assistant:devfrom
rohankapoorcom:fix-cpuspeed

Conversation

@rohankapoorcom
Copy link
Copy Markdown
Member

Description:

Check for missing attributes in docker container before using them in CPU Speed sensor.

Related issue (if applicable): fixes #20614

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.

@fabaff fabaff merged commit 9e7d735 into home-assistant:dev Feb 1, 2019
@ghost ghost removed the in progress label Feb 1, 2019
}

if HZ_ADVERTISED_RAW in self.info:
attrs[ATTR_HZ] = round(
Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare Feb 1, 2019

Choose a reason for hiding this comment

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

We shouldn't duplicate the state in state attributes. I think we should remove this here.

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.

Nevermind, it's not the same key. Read too fast. 🤦‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sensor.cpuspeed inside docker container and not in container, is it possible to return 'Unknown' for CPU speed in container instead of crashing?

4 participants