Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
HomeAssistant
Core
Commits
57e6dc3f
Commit
57e6dc3f
authored
5 years ago
by
chriscla
Committed by
Paulus Schoutsen
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixing nzbget units display (#27521)
parent
17c3efa5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
homeassistant/components/nzbget/sensor.py
+4
-4
4 additions, 4 deletions
homeassistant/components/nzbget/sensor.py
with
4 additions
and
4 deletions
homeassistant/components/nzbget/sensor.py
+
4
−
4
View file @
57e6dc3f
...
...
@@ -34,9 +34,9 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
name
=
discovery_info
[
"
client_name
"
]
devices
=
[]
for
sensor_type
,
sensor_config
in
SENSOR_TYPES
.
item
s
():
for
sensor_config
in
SENSOR_TYPES
.
value
s
():
new_sensor
=
NZBGetSensor
(
nzbget_data
,
sensor_
type
,
name
,
sensor_config
[
0
],
sensor_config
[
1
]
nzbget_data
,
sensor_
config
[
0
]
,
name
,
sensor_config
[
1
],
sensor_config
[
2
]
)
devices
.
append
(
new_sensor
)
...
...
@@ -50,8 +50,8 @@ class NZBGetSensor(Entity):
self
,
nzbget_data
,
sensor_type
,
client_name
,
sensor_name
,
unit_of_measurement
):
"""
Initialize a new NZBGet sensor.
"""
self
.
_name
=
f
"
{
client_name
}
{
sensor_
typ
e
}
"
self
.
type
=
sensor_
nam
e
self
.
_name
=
f
"
{
client_name
}
{
sensor_
nam
e
}
"
self
.
type
=
sensor_
typ
e
self
.
client_name
=
client_name
self
.
nzbget_data
=
nzbget_data
self
.
_state
=
None
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment