Replaced some hardcoded strings with constants and config_entries

This commit is contained in:
rospogrigio
2020-09-18 14:00:36 +02:00
committed by rospogrigio
parent 1a9f7382fc
commit 6f14df2d74
2 changed files with 6 additions and 6 deletions

View File

@@ -117,12 +117,12 @@ class LocalTuyaEntity(Entity):
return {
"identifiers": {
# Serial numbers are unique identifiers within a specific domain
("LocalTuya", f"local_{self._device.unique_id}")
(DOMAIN, f"local_{self._device.unique_id}")
},
"name": self._device._friendly_name,
"name": self._config_entry.data[CONF_FRIENDLY_NAME],
"manufacturer": "Unknown",
"model": "Tuya generic",
"sw_version": "3.3",
"sw_version": self._config_entry.data[CONF_PROTOCOL_VERSION],
}
@property