From dd4a350bd585ea17ef799670cc11b2017b1de110 Mon Sep 17 00:00:00 2001 From: Christopher Rosset Date: Fri, 17 Apr 2020 20:42:58 -0400 Subject: [PATCH] Use name instead of friendly name in uscis config (#33431) The USCIS integration's code and documentation use different properties for the sensor name. The code uses `friendly_name` and the docs state `name`. https://github.com/home-assistant/home-assistant.io/pull/12524#issuecomment-605604002 suggested to make the changes in the code as `friendly_name` is not usually used in this way. --- homeassistant/components/uscis/sensor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/uscis/sensor.py b/homeassistant/components/uscis/sensor.py index 270023bf99a..2e15a4b1422 100644 --- a/homeassistant/components/uscis/sensor.py +++ b/homeassistant/components/uscis/sensor.py @@ -6,7 +6,7 @@ import uscisstatus import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA -from homeassistant.const import CONF_FRIENDLY_NAME +from homeassistant.const import CONF_NAME from homeassistant.helpers import config_validation as cv from homeassistant.helpers.entity import Entity from homeassistant.util import Throttle @@ -17,7 +17,7 @@ DEFAULT_NAME = "USCIS" PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( { - vol.Optional(CONF_FRIENDLY_NAME, default=DEFAULT_NAME): cv.string, + vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string, vol.Required("case_id"): cv.string, } ) @@ -25,7 +25,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the platform in Home Assistant and Case Information.""" - uscis = UscisSensor(config["case_id"], config[CONF_FRIENDLY_NAME]) + uscis = UscisSensor(config["case_id"], config[CONF_NAME]) uscis.update() if uscis.valid_case_id: add_entities([uscis])