Skip to content

Add "status" to Sonarr sensor#9204

Merged
pvizeli merged 8 commits into
home-assistant:devfrom
tboyce021:patch-2
Aug 29, 2017
Merged

Add "status" to Sonarr sensor#9204
pvizeli merged 8 commits into
home-assistant:devfrom
tboyce021:patch-2

Conversation

@tboyce021
Copy link
Copy Markdown
Contributor

Description:

Adds system status information to the Sonarr sensor.

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>

Example entry for configuration.yaml (if applicable):

- platform: sonarr
    api_key: !secret sonarr_api_key
    host: 192.168.1.100
    days: 7
    monitored_conditions:
      - status

Checklist:

If user exposed functionality or configuration variables are added/changed:

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.

Comment thread tests/components/sensor/test_sonarr.py Outdated
self.assertEqual(
'6.2.9200.0',
device.device_state_attributes['osVersion'])

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

blank line contains whitespace

Comment thread tests/components/sensor/test_sonarr.py Outdated
'status'
]
}
radarr.setup_platform(self.hass, config, self.add_devices, 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.

undefined name 'radarr'

Comment thread tests/components/sensor/test_sonarr.py Outdated
"isLinux": false,
"isWindows": true,
"branch": "develop",
"authentication": false,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

undefined name 'false'

Comment thread tests/components/sensor/test_sonarr.py Outdated
"osVersion": "6.2.9200.0",
"isMono": false,
"isLinux": false,
"isWindows": 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.

undefined name 'true'

Comment thread tests/components/sensor/test_sonarr.py Outdated
"appData": "C:\\ProgramData\\NzbDrone",
"osVersion": "6.2.9200.0",
"isMono": false,
"isLinux": false,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

undefined name 'false'

Comment thread tests/components/sensor/test_sonarr.py Outdated
"isDebug": false,
"isProduction": true,
"isAdmin": true,
"isUserInteractive": false,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

undefined name 'false'

Comment thread tests/components/sensor/test_sonarr.py Outdated
"buildTime": "2014-02-08T20:49:36.5560392Z",
"isDebug": false,
"isProduction": true,
"isAdmin": 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.

undefined name 'true'

Comment thread tests/components/sensor/test_sonarr.py Outdated
"version": "2.0.0.1121",
"buildTime": "2014-02-08T20:49:36.5560392Z",
"isDebug": false,
"isProduction": 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.

undefined name 'true'

Comment thread tests/components/sensor/test_sonarr.py Outdated
return MockResponse({
"version": "2.0.0.1121",
"buildTime": "2014-02-08T20:49:36.5560392Z",
"isDebug": false,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

undefined name 'false'

self.ssl, self.host, self.port, self.urlbase,
self.apikey), data['totalRecords']), timeout=5)
self.ssl, self.host, self.port, self.urlbase),
data['totalRecords']),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

continuation line unaligned for hanging indent

self.ssl, self.host, self.port, self.urlbase),
data['totalRecords']),
headers={'X-Api-Key': self.apikey},
timeout=10)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

continuation line unaligned for hanging indent

ENDPOINTS[self.type].format(
self.ssl, self.host, self.port, self.urlbase),
data['totalRecords']),
headers={'X-Api-Key': self.apikey},
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

continuation line unaligned for hanging indent

'{}?pageSize={}'.format(
ENDPOINTS[self.type].format(
self.ssl, self.host, self.port, self.urlbase),
data['totalRecords']),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

continuation line unaligned for hanging indent

@pvizeli pvizeli merged commit 75559cb into home-assistant:dev Aug 29, 2017
@tboyce021 tboyce021 deleted the patch-2 branch August 29, 2017 15:20
matemaciek added a commit to matemaciek/home-assistant that referenced this pull request Aug 30, 2017
* upstream/dev: (113 commits)
  Fix fitbit error when trying to access token after upgrade. (home-assistant#9183)
  Upgrade sendgrid to 5.0.1 (home-assistant#9215)
  Upgrade pyasn1 to 0.3.3 and pyasn1-modules to 0.1.1 (home-assistant#9216)
  directv: extended discovery via REST api, bug fix  (home-assistant#8800)
  Bayesian Binary Sensor (home-assistant#8810)
  Add cloud auth support (home-assistant#9208)
  Abode push events and lock, cover, and switch components (home-assistant#9095)
  Lint Sonarr tests
  Upgrade pymysensors to 0.11.1 (home-assistant#9212)
  Refactor rfxtrx (home-assistant#9117)
  Issue home-assistant#6893 in rfxtrx (home-assistant#9130)
  Support for season sensor (home-assistant#8958)
  Add counter component (home-assistant#9146)
  Fix and optimize digitalloggers platform (home-assistant#9203)
  Prevent error when no forecast data was available (home-assistant#9176)
  Add "status" to Sonarr sensor (home-assistant#9204)
  fix worldtidesinfo home-assistant#9184 (home-assistant#9201)
  Update pushbullet.py (home-assistant#9200)
  Fix dht22 when no data was read initially home-assistant#8976 (home-assistant#9198)
  Prevent iCloud exceptions in logfile (home-assistant#9179)
  ...
@balloob balloob mentioned this pull request Sep 7, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Dec 11, 2017
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.

4 participants