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
d214bfec
Unverified
Commit
d214bfec
authored
3 years ago
by
epenet
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use DeviceInfo in upb (#58621)
Co-authored-by:
epenet
<
epenet@users.noreply.github.com
>
parent
6391376d
Branches
object_detection
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
homeassistant/components/upb/__init__.py
+9
-9
9 additions, 9 deletions
homeassistant/components/upb/__init__.py
with
9 additions
and
9 deletions
homeassistant/components/upb/__init__.py
+
9
−
9
View file @
d214bfec
...
@@ -4,7 +4,7 @@ import upb_lib
...
@@ -4,7 +4,7 @@ import upb_lib
from
homeassistant.const
import
ATTR_COMMAND
,
CONF_FILE_PATH
,
CONF_HOST
from
homeassistant.const
import
ATTR_COMMAND
,
CONF_FILE_PATH
,
CONF_HOST
from
homeassistant.core
import
callback
from
homeassistant.core
import
callback
from
homeassistant.helpers.entity
import
Entity
from
homeassistant.helpers.entity
import
DeviceInfo
,
Entity
from
.const
import
(
from
.const
import
(
ATTR_ADDRESS
,
ATTR_ADDRESS
,
...
@@ -119,12 +119,12 @@ class UpbAttachedEntity(UpbEntity):
...
@@ -119,12 +119,12 @@ class UpbAttachedEntity(UpbEntity):
"""
Base class for UPB attached entities.
"""
"""
Base class for UPB attached entities.
"""
@property
@property
def
device_info
(
self
):
def
device_info
(
self
)
->
DeviceInfo
:
"""
Device info for the entity.
"""
"""
Device info for the entity.
"""
return
{
return
DeviceInfo
(
"
name
"
:
self
.
_element
.
name
,
identifiers
=
{(
DOMAIN
,
self
.
_element
.
index
)}
,
"
identifiers
"
:
{(
DOMAIN
,
self
.
_element
.
index
)}
,
manufacturer
=
self
.
_element
.
manufacturer
,
"
sw_version
"
:
self
.
_element
.
version
,
model
=
self
.
_element
.
product
,
"
manufacturer
"
:
self
.
_element
.
manufacturer
,
name
=
self
.
_element
.
name
,
"
model
"
:
self
.
_element
.
product
,
sw_version
=
self
.
_element
.
version
,
}
)
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