Be consistent with Home Assistant and Hass.io spelling (#30500)

* Be consistent with Home Assistant spelling

* Be consistent with Hass.io spelling
This commit is contained in:
Ville Skyttä 2020-01-05 14:09:17 +02:00 committed by GitHub
parent 24b25b8917
commit 5216477353
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
139 changed files with 189 additions and 189 deletions

View file

@ -252,7 +252,7 @@ def cmdline() -> List[str]:
async def setup_and_run_hass(config_dir: str, args: argparse.Namespace) -> int:
"""Set up HASS and run."""
"""Set up Home Assistant and run."""
from homeassistant import bootstrap, core
hass = core.HomeAssistant()

View file

@ -200,7 +200,7 @@ class Data:
@AUTH_PROVIDERS.register("homeassistant")
class HassAuthProvider(AuthProvider):
"""Auth provider based on a local storage of users in HASS config dir."""
"""Auth provider based on a local storage of users in Home Assistant config dir."""
DEFAULT_TITLE = "Home Assistant Local"

View file

@ -170,7 +170,7 @@ async def async_unload_entry(hass, config_entry):
def setup_hass_services(hass):
"""Home assistant services."""
"""Home Assistant services."""
def change_setting(call):
"""Change an Abode system setting."""

View file

@ -55,7 +55,7 @@ class AbodeLight(AbodeDevice, Light):
self._device.set_color(kwargs[ATTR_HS_COLOR])
if ATTR_BRIGHTNESS in kwargs and self._device.is_dimmable:
# Convert HASS brightness (0-255) to Abode brightness (0-99)
# Convert Home Assistant brightness (0-255) to Abode brightness (0-99)
# If 100 is sent to Abode, response is 99 causing an error
self._device.set_level(ceil(kwargs[ATTR_BRIGHTNESS] * 99 / 255.0))
else:
@ -78,7 +78,7 @@ class AbodeLight(AbodeDevice, Light):
# Abode returns 100 during device initialization and device refresh
if brightness == 100:
return 255
# Convert Abode brightness (0-99) to HASS brightness (0-255)
# Convert Abode brightness (0-99) to Home Assistant brightness (0-255)
return ceil(brightness * 255 / 99.0)
@property

View file

@ -77,7 +77,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
async_add_entities([instance], True)
async def handle_add_tracking(call):
"""Call when a user adds a new Aftership tracking from HASS."""
"""Call when a user adds a new Aftership tracking from Home Assistant."""
title = call.data.get(CONF_TITLE)
slug = call.data.get(CONF_SLUG)
tracking_number = call.data[CONF_TRACKING_NUMBER]
@ -93,7 +93,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
)
async def handle_remove_tracking(call):
"""Call when a user removes an Aftership tracking from HASS."""
"""Call when a user removes an Aftership tracking from Home Assistant."""
slug = call.data[CONF_SLUG]
tracking_number = call.data[CONF_TRACKING_NUMBER]

View file

@ -194,7 +194,7 @@ class AirVisualSensor(Entity):
@property
def unique_id(self):
"""Return a unique, HASS-friendly identifier for this entity."""
"""Return a unique, Home Assistant friendly identifier for this entity."""
return f"{self._location_id}_{self._locale}_{self._type}"
@property

View file

@ -213,7 +213,7 @@ class Alert(ToggleEntity):
@property
def should_poll(self):
"""HASS need not poll these entities."""
"""Home Assistant need not poll these entities."""
return False
@property

View file

@ -165,7 +165,7 @@ def setup(hass, config):
_LOGGER.debug("August HTTP session closed.")
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, close_http_session)
_LOGGER.debug("Registered for HASS stop event")
_LOGGER.debug("Registered for Home Assistant stop event")
return setup_august(hass, config, api, authenticator)

View file

@ -323,7 +323,7 @@ class AutomationEntity(ToggleEntity, RestoreEntity):
await self.async_update_ha_state()
async def async_will_remove_from_hass(self):
"""Remove listeners when removing automation from HASS."""
"""Remove listeners when removing automation from Home Assistant."""
await super().async_will_remove_from_hass()
await self.async_disable()

View file

@ -19,7 +19,7 @@ def setup(hass, config):
GPIO.cleanup()
def prepare_gpio(event):
"""Stuff to do when home assistant starts."""
"""Stuff to do when Home Assistant starts."""
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, cleanup_gpio)
hass.bus.listen_once(EVENT_HOMEASSISTANT_START, prepare_gpio)

View file

@ -88,7 +88,7 @@ class BeewiSmartclimSensor(Entity):
@property
def unique_id(self):
"""Return a unique, HASS-friendly identifier for this entity."""
"""Return a unique, Home Assistant friendly identifier for this entity."""
return f"{self._mac}_{self._device}"
@property

View file

@ -31,7 +31,7 @@ class BMWDeviceTracker:
def update(self) -> None:
"""Update the device info.
Only update the state in home assistant if tracking in
Only update the state in Home Assistant if tracking in
the car is enabled.
"""
dev_id = slugify(self.vehicle.name)

View file

@ -134,7 +134,7 @@ class BuienradarCam(Camera):
Uses ayncio conditions to make sure only one task enters the critical
section at the same time. Otherwise, two http requests would start
when two tabs with home assistant are open.
when two tabs with Home Assistant are open.
The condition is entered in two sections because otherwise the lock
would be held while doing the http request.

View file

@ -52,7 +52,7 @@ class CloudProvider(Provider):
"""NabuCasa speech API provider."""
def __init__(self, cloud: Cloud) -> None:
"""Hass NabuCasa Speech to text."""
"""Home Assistant NabuCasa Speech to text."""
self.cloud = cloud
@property

View file

@ -23,7 +23,7 @@
},
"hassio_confirm": {
"title": "deCONZ Zigbee gateway via Hass.io add-on",
"description": "Do you want to configure Home Assistant to connect to the deCONZ gateway provided by the hass.io add-on {addon}?",
"description": "Do you want to configure Home Assistant to connect to the deCONZ gateway provided by the Hass.io add-on {addon}?",
"data": {
"allow_clip_sensor": "Allow importing virtual sensors",
"allow_deconz_groups": "Allow importing deCONZ groups"

View file

@ -219,7 +219,7 @@ class DlnaDmrDevice(MediaPlayerDevice):
return self._available
async def _async_on_hass_stop(self, event):
"""Event handler on HASS stop."""
"""Event handler on Home Assistant stop."""
with await self.hass.data[DLNA_DMR_DATA]["lock"]:
await self._device.async_unsubscribe_services()

View file

@ -44,7 +44,7 @@ def setup(hass, config):
"""Listen for download events to download files."""
download_path = config[DOMAIN][CONF_DOWNLOAD_DIR]
# If path is relative, we assume relative to HASS config dir
# If path is relative, we assume relative to Home Assistant config dir
if not os.path.isabs(download_path):
download_path = hass.config.path(download_path)

View file

@ -27,7 +27,7 @@ ECOBEE_PLATFORMS = ["binary_sensor", "climate", "sensor", "weather"]
MANUFACTURER = "ecobee"
# Translates ecobee API weatherSymbol to HASS usable names
# Translates ecobee API weatherSymbol to Home Assistant usable names
# https://www.ecobee.com/home/developer/api/documentation/v1/objects/WeatherForecast.shtml
ECOBEE_WEATHER_SYMBOL_TO_HASS = {
0: "sunny",

View file

@ -44,7 +44,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
vacuums = []
for device in hass.data[ECOVACS_DEVICES]:
vacuums.append(EcovacsVacuum(device))
_LOGGER.debug("Adding Ecovacs Vacuums to Hass: %s", vacuums)
_LOGGER.debug("Adding Ecovacs Vacuums to Home Assistant: %s", vacuums)
add_entities(vacuums, True)

View file

@ -119,7 +119,7 @@ def setup(hass, config):
"""Handle Home Assistant stop event."""
server.stop()
# listen to home assistant stop event
# listen to Home Assistant stop event
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, handle_stop_event)
except OSError:

View file

@ -3,7 +3,7 @@
# Integration domain
DOMAIN = "elgato"
# Hass data keys
# Home Assistant data keys
DATA_ELGATO_CLIENT = "elgato_client"
# Attributes

View file

@ -35,7 +35,7 @@ class DescriptionXmlView(HomeAssistantView):
<URLBase>http://{0}:{1}/</URLBase>
<device>
<deviceType>urn:schemas-upnp-org:device:Basic:1</deviceType>
<friendlyName>HASS Bridge ({0})</friendlyName>
<friendlyName>Home Assistant Bridge ({0})</friendlyName>
<manufacturer>Royal Philips Electronics</manufacturer>
<manufacturerURL>http://www.philips.com</manufacturerURL>
<modelDescription>Philips hue Personal Wireless Lighting</modelDescription>

View file

@ -199,10 +199,10 @@ class EphEmberThermostat(ClimateDevice):
@staticmethod
def map_mode_hass_eph(operation_mode):
"""Map from home assistant mode to eph mode."""
"""Map from Home Assistant mode to eph mode."""
return getattr(ZoneMode, HA_STATE_TO_EPH.get(operation_mode), None)
@staticmethod
def map_mode_eph_hass(operation_mode):
"""Map from eph mode to home assistant mode."""
"""Map from eph mode to Home Assistant mode."""
return EPH_TO_HA_STATE.get(operation_mode.name, HVAC_MODE_HEAT_COOL)

View file

@ -142,7 +142,7 @@ class FluNearYouSensor(Entity):
@property
def unique_id(self):
"""Return a unique, HASS-friendly identifier for this entity."""
"""Return a unique, Home Assistant friendly identifier for this entity."""
return f"{self.fny.latitude},{self.fny.longitude}_{self._kind}"
@property

View file

@ -55,12 +55,12 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
def to_futurenow_level(level):
"""Convert the given HASS light level (0-255) to FutureNow (0-100)."""
"""Convert the given Home Assistant light level (0-255) to FutureNow (0-100)."""
return int((level * 100) / 255)
def to_hass_level(level):
"""Convert the given FutureNow (0-100) light level to HASS (0-255)."""
"""Convert the given FutureNow (0-100) light level to Home Assistant (0-255)."""
return int((level * 255) / 100)

View file

@ -582,12 +582,12 @@ class Group(Entity):
self._async_update_group_state()
async def async_added_to_hass(self):
"""Handle addition to HASS."""
"""Handle addition to Home Assistant."""
if self.tracking:
self.async_start()
async def async_will_remove_from_hass(self):
"""Handle removal from HASS."""
"""Handle removal from Home Assistant."""
if self._async_unsub_state_changed:
self._async_unsub_state_changed()
self._async_unsub_state_changed = None

View file

@ -113,7 +113,7 @@ class LightGroup(light.Light):
await self.async_update()
async def async_will_remove_from_hass(self):
"""Handle removal from HASS."""
"""Handle removal from Home Assistant."""
if self._async_unsub_state_changed is not None:
self._async_unsub_state_changed()
self._async_unsub_state_changed = None

View file

@ -136,7 +136,7 @@ def get_homeassistant_version(hass):
@callback
@bind_hass
def is_hassio(hass):
"""Return true if hass.io is loaded.
"""Return true if Hass.io is loaded.
Async friendly.
"""
@ -171,7 +171,7 @@ async def async_setup(hass, config):
if user and user.refresh_tokens:
refresh_token = list(user.refresh_tokens.values())[0]
# Migrate old hass.io users to be admin.
# Migrate old Hass.io users to be admin.
if not user.is_admin:
await hass.auth.async_update_user(user, group_ids=[GROUP_ID_ADMIN])
@ -219,7 +219,7 @@ async def async_setup(hass, config):
snapshot = data.pop(ATTR_SNAPSHOT, None)
payload = None
# Pass data to hass.io API
# Pass data to Hass.io API
if service.service == SERVICE_ADDON_STDIN:
payload = data[ATTR_INPUT]
elif MAP_SERVICE_API[service.service][3]:

View file

@ -226,7 +226,7 @@ class HERETravelTimeSensor(Entity):
@callback
def delayed_sensor_update(event):
"""Update sensor after homeassistant started."""
"""Update sensor after Home Assistant started."""
self.async_schedule_update_ha_state(True)
self.hass.bus.async_listen_once(

View file

@ -109,7 +109,7 @@ _LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up home assistant scene entries."""
"""Set up Home Assistant scene entries."""
_process_scenes_config(hass, async_add_entities, config)
# This platform can be loaded multiple times. Only first time register the service.

View file

@ -122,7 +122,7 @@ class HKDevice:
self.hass.helpers.dispatcher.async_dispatcher_send(self.signal_state_updated)
async def async_setup(self):
"""Prepare to use a paired HomeKit device in homeassistant."""
"""Prepare to use a paired HomeKit device in Home Assistant."""
cache = self.hass.data[ENTITY_MAP].get_map(self.unique_id)
if not cache:
if await self.async_refresh_entity_map(self.config_num):

View file

@ -412,7 +412,7 @@ def setup(hass, config):
# Start server thread, connect to hosts, initialize to receive events
homematic.start()
# Stops server when HASS is shutting down
# Stops server when Home Assistant is shutting down
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, hass.data[DATA_HOMEMATIC].stop)
# Init homematic hubs
@ -600,7 +600,7 @@ def _system_callback_handler(hass, config, src, *args):
if hmdevice.EVENTNODE:
hmdevice.setEventCallback(callback=bound_event_callback, bequeath=True)
# Create HASS entities
# Create Home Assistant entities
if addresses:
for component_name, discovery_type in (
("switch", DISCOVER_SWITCHES),
@ -616,7 +616,7 @@ def _system_callback_handler(hass, config, src, *args):
found_devices = _get_devices(hass, discovery_type, addresses, interface)
# When devices of this type are found
# they are setup in HASS and a discovery event is fired
# they are setup in Home Assistant and a discovery event is fired
if found_devices:
discovery.load_platform(
hass,
@ -969,7 +969,7 @@ class HMDevice(Entity):
self._available = not self._hmdevice.UNREACH
has_changed = True
# If it has changed data point, update HASS
# If it has changed data point, update Home Assistant
if has_changed:
self.schedule_update_ha_state()

View file

@ -17,7 +17,7 @@ from .const import DOMAIN, LOGGER # pylint: disable=unused-import
from .errors import AuthenticationRequired, CannotConnect
HUE_MANUFACTURERURL = "http://www.philips.com"
HUE_IGNORED_BRIDGE_NAMES = ["HASS Bridge", "Espalexa"]
HUE_IGNORED_BRIDGE_NAMES = ["Home Assistant Bridge", "Espalexa"]
class HueFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):

View file

@ -36,7 +36,7 @@ STATE_ATTRIBUTE_ROOM_NAME = "roomName"
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up home assistant scene entries."""
"""Set up Home Assistant scene entries."""
hub_address = config.get(HUB_ADDRESS)
websession = async_get_clientsession(hass)

View file

@ -73,7 +73,7 @@ class IdteckReader:
self._connection = rfk101py(self._host, self._port, self._callback)
def _callback(self, card):
"""Send a keycard event message into HASS whenever a card is read."""
"""Send a keycard event message into Home Assistant whenever a card is read."""
self.hass.bus.fire(
EVENT_IDTECK_PROX_KEYCARD, {"card": card, "name": self._name}
)

View file

@ -1,5 +1,5 @@
# IHC auto setup configuration.
# To customize this, copy this file to the home assistant configuration
# To customize this, copy this file to the Home Assistant configuration
# folder and make your changes.
binary_sensor:

View file

@ -232,7 +232,7 @@ class IQVIAEntity(Entity):
@property
def unique_id(self):
"""Return a unique, HASS-friendly identifier for this entity."""
"""Return a unique, Home Assistant friendly identifier for this entity."""
return f"{self._zip_code}_{self._type}"
@property

View file

@ -56,8 +56,8 @@ CONFIG_SCHEMA = vol.Schema(
extra=vol.ALLOW_EXTRA,
)
# Do not use the Hass consts for the states here - we're matching exact API
# responses, not using them for Hass states
# Do not use the Home Assistant consts for the states here - we're matching
# exact API responses, not using them for Home Assistant states
NODE_FILTERS = {
"binary_sensor": {
"uom": [],
@ -157,7 +157,7 @@ SUPPORTED_DOMAINS = [
]
SUPPORTED_PROGRAM_DOMAINS = ["binary_sensor", "lock", "fan", "cover", "switch"]
# ISY Scenes are more like Switches than Hass Scenes
# ISY Scenes are more like Switches than Home Assistant Scenes
# (they can turn off, and report their state)
SCENE_DOMAIN = "switch"

View file

@ -100,8 +100,8 @@ class ISYBinarySensorDevice(ISYDevice, BinarySensorDevice):
Often times, a single device is represented by multiple nodes in the ISY,
allowing for different nuances in how those devices report their on and
off events. This class turns those multiple nodes in to a single Hass
entity and handles both ways that ISY binary sensors can work.
off events. This class turns those multiple nodes in to a single Home
Assistant entity and handles both ways that ISY binary sensors can work.
"""
def __init__(self, node) -> None:

View file

@ -66,7 +66,7 @@ async def async_setup(hass, config):
_LOGGER.error("Could not find a charging station at %s", host)
return False
# Set failsafe mode at start up of home assistant
# Set failsafe mode at start up of Home Assistant
failsafe = config[DOMAIN][CONF_FS]
timeout = config[DOMAIN][CONF_FS_TIMEOUT] if failsafe else 0
fallback = config[DOMAIN][CONF_FS_FALLBACK] if failsafe else 0

View file

@ -322,7 +322,7 @@ class KNXExposeTime:
class KNXExposeSensor:
"""Object to Expose HASS entity to KNX bus."""
"""Object to Expose Home Assistant entity to KNX bus."""
def __init__(self, hass, xknx, expose_type, entity_id, address):
"""Initialize of Expose class."""

View file

@ -189,7 +189,7 @@ class KNXCover(CoverDevice):
await self.device.set_angle(tilt_position)
def start_auto_updater(self):
"""Start the autoupdater to update HASS while cover is moving."""
"""Start the autoupdater to update Home Assistant while cover is moving."""
if self._unsubscribe_auto_updater is None:
self._unsubscribe_auto_updater = async_track_utc_time_change(
self.hass, self.auto_updater_hook

View file

@ -195,7 +195,7 @@ def humanify(hass, events):
Will try to group events if possible:
- if 2+ sensor updates in GROUP_BY_MINUTES, show last
- if home assistant stop and start happen in same minute call it restarted
- if Home Assistant stop and start happen in same minute call it restarted
"""
domain_prefixes = tuple(f"{dom}." for dom in CONTINUOUS_DOMAINS)

View file

@ -19,12 +19,12 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
def to_lutron_level(level):
"""Convert the given HASS light level (0-255) to Lutron (0.0-100.0)."""
"""Convert the given Home Assistant light level (0-255) to Lutron (0.0-100.0)."""
return float((level * 100) / 255)
def to_hass_level(level):
"""Convert the given Lutron (0.0-100.0) light level to HASS (0-255)."""
"""Convert the given Lutron (0.0-100.0) light level to Home Assistant (0-255)."""
return int((level * 255) / 100)

View file

@ -155,7 +155,7 @@ class MaxCubeClimate(ClimateDevice):
@staticmethod
def map_temperature_max_hass(temperature):
"""Map Temperature from MAX! to HASS."""
"""Map Temperature from MAX! to Home Assistant."""
if temperature is None:
return 0.0

View file

@ -170,7 +170,7 @@ def get_minio_endpoint(host: str, port: int) -> str:
class QueueListener(threading.Thread):
"""Forward events from queue into HASS event bus."""
"""Forward events from queue into Home Assistant event bus."""
def __init__(self, hass):
"""Create queue."""
@ -179,7 +179,7 @@ class QueueListener(threading.Thread):
self._queue = Queue()
def run(self):
"""Listen to queue events, and forward them to HASS event bus."""
"""Listen to queue events, and forward them to Home Assistant event bus."""
_LOGGER.info("Running QueueListener")
while True:
event = self._queue.get()

View file

@ -307,7 +307,7 @@ class MqttClimate(
MqttEntityDeviceInfo.__init__(self, device_config, config_entry)
async def async_added_to_hass(self):
"""Handle being added to home assistant."""
"""Handle being added to Home Assistant."""
await super().async_added_to_hass()
await self._subscribe_topics()

View file

@ -15,7 +15,7 @@
},
"hassio_confirm": {
"title": "MQTT Broker via Hass.io add-on",
"description": "Do you want to configure Home Assistant to connect to the MQTT broker provided by the hass.io add-on {addon}?",
"description": "Do you want to configure Home Assistant to connect to the MQTT broker provided by the Hass.io add-on {addon}?",
"data": {
"discovery": "Enable discovery"
}

View file

@ -97,7 +97,7 @@ class MyQDevice(CoverDevice):
@property
def unique_id(self):
"""Return a unique, HASS-friendly identifier for this entity."""
"""Return a unique, Home Assistant friendly identifier for this entity."""
return self._device.device_id
async def async_close_cover(self, **kwargs):

View file

@ -83,7 +83,7 @@ class LeafRangeSensor(LeafEntity):
def log_registration(self):
"""Log registration."""
_LOGGER.debug(
"Registered LeafRangeSensor integration with HASS for VIN %s",
"Registered LeafRangeSensor integration with Home Assistant for VIN %s",
self.car.leaf.vin,
)

View file

@ -32,7 +32,7 @@ class LeafClimateSwitch(LeafEntity, ToggleEntity):
def log_registration(self):
"""Log registration."""
_LOGGER.debug(
"Registered LeafClimateSwitch integration with HASS for VIN %s",
"Registered LeafClimateSwitch integration with Home Assistant for VIN %s",
self.car.leaf.vin,
)

View file

@ -75,7 +75,7 @@ class OpenUvBinarySensor(OpenUvEntity, BinarySensorDevice):
@property
def unique_id(self) -> str:
"""Return a unique, HASS-friendly identifier for this entity."""
"""Return a unique, Home Assistant friendly identifier for this entity."""
return f"{self._latitude}_{self._longitude}_{self._sensor_type}"
async def async_added_to_hass(self):

View file

@ -97,7 +97,7 @@ class OpenUvSensor(OpenUvEntity):
@property
def unique_id(self) -> str:
"""Return a unique, HASS-friendly identifier for this entity."""
"""Return a unique, Home Assistant friendly identifier for this entity."""
return f"{self._latitude}_{self._longitude}_{self._sensor_type}"
@property

View file

@ -21,7 +21,7 @@ async def async_setup(hass, config):
GPIO.cleanup()
def prepare_gpio(event):
"""Stuff to do when home assistant starts."""
"""Stuff to do when Home Assistant starts."""
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, cleanup_gpio)
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_START, prepare_gpio)

View file

@ -50,7 +50,7 @@ class CurrentEnergyUsageSensor(Entity):
@property
def unique_id(self):
"""Return a unique, HASS-friendly identifier for this entity."""
"""Return a unique, Home Assistant friendly identifier for this entity."""
return self.meter.meter_id
@property

View file

@ -376,7 +376,7 @@ class PS4Device(MediaPlayerDevice):
self._unique_id = format_unique_id(self._creds, status["host-id"])
async def async_will_remove_from_hass(self):
"""Remove Entity from Hass."""
"""Remove Entity from Home Assistant."""
# Close TCP Transport.
if self._ps4.connected:
await self._ps4.close()

View file

@ -40,9 +40,9 @@ OPERATION_LIST = [HVAC_MODE_AUTO, HVAC_MODE_COOL, HVAC_MODE_HEAT, HVAC_MODE_OFF]
CT30_FAN_OPERATION_LIST = [STATE_ON, HVAC_MODE_AUTO]
CT80_FAN_OPERATION_LIST = [STATE_ON, STATE_CIRCULATE, HVAC_MODE_AUTO]
# Mappings from radiotherm json data codes to and from HASS state
# Mappings from radiotherm json data codes to and from Home Assistant state
# flags. CODE is the thermostat integer code and these map to and
# from HASS state flags.
# from Home Assistant state flags.
# Programmed temperature mode of the thermostat.
CODE_TO_TEMP_MODE = {
@ -220,7 +220,7 @@ class RadioThermostat(ClimateDevice):
"""Update and validate the data from the thermostat."""
# Radio thermostats are very slow, and sometimes don't respond
# very quickly. So we need to keep the number of calls to them
# to a bare minimum or we'll hit the HASS 10 sec warning. We
# to a bare minimum or we'll hit the Home Assistant 10 sec warning. We
# have to make one call to /tstat to get temps but we'll try and
# keep the other calls to a minimum. Even with this, these
# thermostats tend to time out sometimes when they're actively

View file

@ -76,7 +76,7 @@ class RainMachineBinarySensor(RainMachineEntity, BinarySensorDevice):
@property
def unique_id(self) -> str:
"""Return a unique, HASS-friendly identifier for this entity."""
"""Return a unique, Home Assistant friendly identifier for this entity."""
return "{0}_{1}".format(
self.rainmachine.device_mac.replace(":", ""), self._sensor_type
)

View file

@ -72,7 +72,7 @@ class RainMachineSensor(RainMachineEntity):
@property
def unique_id(self) -> str:
"""Return a unique, HASS-friendly identifier for this entity."""
"""Return a unique, Home Assistant friendly identifier for this entity."""
return "{0}_{1}".format(
self.rainmachine.device_mac.replace(":", ""), self._sensor_type
)

View file

@ -143,7 +143,7 @@ class RainMachineSwitch(RainMachineEntity, SwitchDevice):
@property
def unique_id(self) -> str:
"""Return a unique, HASS-friendly identifier for this entity."""
"""Return a unique, Home Assistant friendly identifier for this entity."""
return "{0}_{1}_{2}".format(
self.rainmachine.device_mac.replace(":", ""),
self._switch_type,

View file

@ -76,7 +76,7 @@ class RingLight(Light):
return self._light_on
def _set_light(self, new_state):
"""Update light state, and causes HASS to correctly update."""
"""Update light state, and causes Home Assistant to correctly update."""
self._device.lights = new_state
self._light_on = new_state == ON_STATE
self._no_updates_until = dt_util.utcnow() + SKIP_UPDATES_DELAY

View file

@ -78,7 +78,7 @@ class SirenSwitch(BaseRingSwitch):
self._siren_on = False
def _set_switch(self, new_state):
"""Update switch state, and causes HASS to correctly update."""
"""Update switch state, and causes Home Assistant to correctly update."""
self._device.siren = new_state
self._siren_on = new_state > 0
self._no_updates_until = dt_util.utcnow() + SKIP_UPDATES_DELAY

View file

@ -120,7 +120,7 @@ class RokuDevice(MediaPlayerDevice):
@property
def unique_id(self):
"""Return a unique, HASS-friendly identifier for this entity."""
"""Return a unique, Home Assistant friendly identifier for this entity."""
return self._device_info.serial_num
@property

View file

@ -18,7 +18,7 @@ def setup(hass, config):
GPIO.cleanup()
def prepare_gpio(event):
"""Stuff to do when home assistant starts."""
"""Stuff to do when Home Assistant starts."""
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, cleanup_gpio)
hass.bus.listen_once(EVENT_HOMEASSISTANT_START, prepare_gpio)

View file

@ -22,7 +22,7 @@ def setup(hass, config):
PFIO.deinit()
def prepare_pfio(event):
"""Stuff to do when home assistant starts."""
"""Stuff to do when Home Assistant starts."""
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, cleanup_pfio)
hass.bus.listen_once(EVENT_HOMEASSISTANT_START, prepare_pfio)

View file

@ -150,7 +150,7 @@ async def async_setup(hass, config):
@callback
def alarm_status_update_callback():
"""Send status update received from alarm to home assistant."""
"""Send status update received from alarm to Home Assistant."""
_LOGGER.debug("Sending request to update panel state")
async_dispatcher_send(hass, SIGNAL_PANEL_MESSAGE)

View file

@ -217,7 +217,7 @@ class ScriptEntity(ToggleEntity):
self.script.async_stop()
async def async_will_remove_from_hass(self):
"""Stop script and remove service when it will be removed from HASS."""
"""Stop script and remove service when it will be removed from Home Assistant."""
if self.script.is_running:
self.script.async_stop()

View file

@ -129,7 +129,7 @@ class SeventeenTrackSummarySensor(Entity):
@property
def unique_id(self):
"""Return a unique, HASS-friendly identifier for this entity."""
"""Return a unique, Home Assistant friendly identifier for this entity."""
return "summary_{0}_{1}".format(self._data.account_id, slugify(self._status))
@property
@ -212,7 +212,7 @@ class SeventeenTrackPackageSensor(Entity):
@property
def unique_id(self):
"""Return a unique, HASS-friendly identifier for this entity."""
"""Return a unique, Home Assistant friendly identifier for this entity."""
return UNIQUE_ID_TEMPLATE.format(self._data.account_id, self._tracking_number)
async def async_update(self):

View file

@ -27,12 +27,12 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
def _to_skybell_level(level):
"""Convert the given HASS light level (0-255) to Skybell (0-100)."""
"""Convert the given Home Assistant light level (0-255) to Skybell (0-100)."""
return int((level * 100) / 255)
def _to_hass_level(level):
"""Convert the given Skybell (0-100) light level to HASS (0-255)."""
"""Convert the given Skybell (0-100) light level to Home Assistant (0-255)."""
return int((level * 255) / 100)

View file

@ -110,7 +110,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
if not config_sensors: # Use all sensors by default
config_sensors = {s.name: [] for s in sensor_def}
# Prepare all HASS sensor entities
# Prepare all Home Assistant sensor entities
for name, attr in config_sensors.items():
sub_sensors = [sensor_def[s] for s in attr]
hass_sensors.append(SMAsensor(sensor_def[name], sub_sensors))

View file

@ -88,7 +88,7 @@ async def validate_installed_app(api, installed_app_id: str):
def validate_webhook_requirements(hass: HomeAssistantType) -> bool:
"""Ensure HASS is setup properly to receive webhooks."""
"""Ensure Home Assistant is setup properly to receive webhooks."""
if hass.components.cloud.async_active_subscription():
return True
if hass.data[DOMAIN][CONF_CLOUDHOOK_URL] is not None:

View file

@ -1,4 +1,4 @@
"""API for Somfy bound to HASS OAuth."""
"""API for Somfy bound to Home Assistant OAuth."""
from asyncio import run_coroutine_threadsafe
from typing import Dict, Union

View file

@ -76,7 +76,7 @@ async def async_setup(hass, config):
"""Track the state of the sun."""
if config.get(CONF_ELEVATION) is not None:
_LOGGER.warning(
"Elevation is now configured in home assistant core. "
"Elevation is now configured in Home Assistant core. "
"See https://home-assistant.io/docs/configuration/basic/"
)
Sun(hass)

View file

@ -78,7 +78,7 @@ class SwitchBot(SwitchDevice, RestoreEntity):
@property
def unique_id(self) -> str:
"""Return a unique, HASS-friendly identifier for this entity."""
"""Return a unique, Home Assistant friendly identifier for this entity."""
return self._mac.replace(":", "")
@property

View file

@ -100,7 +100,7 @@ async def async_setup(hass: HomeAssistantType, config: Dict) -> bool:
await v2bridge.start()
async def async_stop_bridge(event: EventType) -> None:
"""On homeassistant stop, gracefully stop the bridge if running."""
"""On Home Assistant stop, gracefully stop the bridge if running."""
await v2bridge.stop()
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, async_stop_bridge)

View file

@ -46,7 +46,7 @@ class SwitchmateEntity(SwitchDevice):
@property
def unique_id(self) -> str:
"""Return a unique, HASS-friendly identifier for this entity."""
"""Return a unique, Home Assistant friendly identifier for this entity."""
return self._mac.replace(":", "")
@property

View file

@ -152,7 +152,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
add_entities(project_devices)
def handle_new_task(call):
"""Call when a user creates a new Todoist Task from HASS."""
"""Call when a user creates a new Todoist Task from Home Assistant."""
project_name = call.data[PROJECT_NAME]
project_id = project_id_lookup[project_name]
@ -571,7 +571,7 @@ class TodoistProjectData:
if self.event[END] is not None:
self.event[END] = {DATETIME: self.event[END].strftime(DATE_STR_FORMAT)}
else:
# HASS gets cranky if a calendar event never ends
# Home Assistant gets cranky if a calendar event never ends
# Let's set our "due date" to tomorrow
self.event[END] = {
DATETIME: (datetime.utcnow() + timedelta(days=1)).strftime(

View file

@ -109,7 +109,7 @@ async def async_setup(hass, config):
if newest is None or "dev" in current_version:
return
# Load data from supervisor on hass.io
# Load data from supervisor on Hass.io
if hass.components.hassio.is_hassio():
newest = hass.components.hassio.get_homeassistant_version()

View file

@ -1,4 +1,4 @@
"""Hass representation of an UPnP/IGD."""
"""Home Assistant representation of an UPnP/IGD."""
import asyncio
from ipaddress import IPv4Address
@ -14,7 +14,7 @@ from .const import CONF_LOCAL_IP, DOMAIN, LOGGER as _LOGGER
class Device:
"""Hass representation of an UPnP/IGD."""
"""Home Assistant representation of an UPnP/IGD."""
def __init__(self, igd_device):
"""Initialize UPnP/IGD device."""

View file

@ -24,7 +24,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the platform in HASS and Case Information."""
"""Set up the platform in Home Assistant and Case Information."""
uscis = UscisSensor(config["case_id"], config[CONF_FRIENDLY_NAME])
uscis.update()
if uscis.valid_case_id:

View file

@ -1,2 +1,2 @@
sync_clock:
description: Sync the velbus modules clock to the HASS clock, this is the same as the 'sync clock' from VelbusLink
description: Sync the velbus modules clock to the Home Assistant clock, this is the same as the 'sync clock' from VelbusLink

View file

@ -63,7 +63,7 @@ class WemoBinarySensor(BinarySensorDevice):
self.async_schedule_update_ha_state()
async def async_added_to_hass(self):
"""Wemo sensor added to HASS."""
"""Wemo sensor added to Home Assistant."""
# Define inside async context so we know our event loop
self._update_lock = asyncio.Lock()

View file

@ -232,7 +232,7 @@ class WemoHumidifier(FanEntity):
return SUPPORTED_FEATURES
async def async_added_to_hass(self):
"""Wemo humidifier added to HASS."""
"""Wemo humidifier added to Home Assistant."""
# Define inside async context so we know our event loop
self._update_lock = asyncio.Lock()

View file

@ -96,7 +96,7 @@ class WemoLight(Light):
self._unique_id = self.wemo.uniqueID
async def async_added_to_hass(self):
"""Wemo light added to HASS."""
"""Wemo light added to Home Assistant."""
# Define inside async context so we know our event loop
self._update_lock = asyncio.Lock()
@ -231,7 +231,7 @@ class WemoDimmer(Light):
self.async_schedule_update_ha_state()
async def async_added_to_hass(self):
"""Wemo dimmer added to HASS."""
"""Wemo dimmer added to Home Assistant."""
# Define inside async context so we know our event loop
self._update_lock = asyncio.Lock()

View file

@ -196,7 +196,7 @@ class WemoSwitch(SwitchDevice):
self.wemo.off()
async def async_added_to_hass(self):
"""Wemo switch added to HASS."""
"""Wemo switch added to Home Assistant."""
# Define inside async context so we know our event loop
self._update_lock = asyncio.Lock()

View file

@ -309,7 +309,7 @@ class WithingsHealthSensor(Entity):
@property
def unique_id(self) -> str:
"""Return a unique, HASS-friendly identifier for this entity."""
"""Return a unique, Home Assistant friendly identifier for this entity."""
return "withings_{}_{}_{}".format(
self._slug, self._user_id, slugify(self._attribute.measurement)
)

View file

@ -3,7 +3,7 @@
# Integration domain
DOMAIN = "wled"
# Hass data keys
# Home Assistant data keys
DATA_WLED_CLIENT = "wled_client"
DATA_WLED_TIMER = "wled_timer"
DATA_WLED_UPDATED = "wled_updated"

View file

@ -171,7 +171,7 @@ class WUDailySimpleForecastSensorConfig(WUSensorConfig):
:param field: field name to use as value
:param wu_unit: "fahrenheit", "celsius", "degrees" etc. see the example json at:
https://www.wunderground.com/weather/api/d/docs?d=data/forecast&MR=1
:param ha_unit: corresponding unit in home assistant
:param ha_unit: corresponding unit in Home Assistant
"""
super().__init__(
friendly_name=friendly_name,

View file

@ -232,7 +232,7 @@ class YamahaDevice(MediaPlayerDevice):
self._zone.update_status()
def update_hass(self):
"""Push updates to HASS."""
"""Push updates to Home Assistant."""
if self.entity_id:
_LOGGER.debug("update_hass: pushing updates")
self.schedule_update_ha_state()

View file

@ -67,7 +67,7 @@ class YesssSMSNotificationService(BaseNotificationService):
def send_message(self, message="", **kwargs):
"""Send a SMS message via Yesss.at's website."""
if self.yesss.account_is_suspended():
# only retry to login after HASS was restarted with (hopefully)
# only retry to login after Home Assistant was restarted with (hopefully)
# new login data.
_LOGGER.error(
"Account is suspended, cannot send SMS. "

View file

@ -96,7 +96,7 @@ def async_active_zone(hass, latitude, longitude, radius=0):
async def async_setup(hass, config):
"""Set up configured zones as well as home assistant zone if necessary."""
"""Set up configured zones as well as Home Assistant zone if necessary."""
hass.data[DOMAIN] = {}
entities: Set[str] = set()
zone_entries = configured_zones(hass)

View file

@ -340,7 +340,7 @@ class FibaroFGRM222(ZwaveRollershutter):
# Note: This is safe to do even if the user has accidentally set
# this configuration parameter, or configuration parameter 10 to
# something other than venetian blind mode. The controller will just
# ignore potential tilt settings sent from home assistant in this
# ignore potential tilt settings sent from Home Assistant in this
# case.
self._has_tilt_mode = True
_LOGGER.info(

View file

@ -141,7 +141,7 @@ start_network:
description: Start the Z-Wave network. This might take a while, depending on how big your Z-Wave network is.
stop_network:
description: Stop the Z-Wave network, all updates into HASS will stop.
description: Stop the Z-Wave network, all updates into Home Assistant will stop.
soft_reset:
description: This will reset the controller without removing its data. Use carefully because not all controllers support this. Refer to your controller's manual.

View file

@ -192,7 +192,7 @@ class HomeAssistant:
return self.state in (CoreState.starting, CoreState.running)
def start(self) -> int:
"""Start home assistant.
"""Start Home Assistant.
Note: This function is only used for testing.
For regular use, use "await hass.run()".
@ -217,7 +217,7 @@ class HomeAssistant:
This method is a coroutine.
"""
if self.state != CoreState.not_running:
raise RuntimeError("HASS is already running")
raise RuntimeError("Home Assistant is already running")
# _async_stop will set this instead of stopping the loop
self._stopped = asyncio.Event()

View file

@ -177,7 +177,7 @@ class RestoreStateData:
self.hass.async_create_task(self.async_dump_states())
# Dump the initial states now. This helps minimize the risk of having
# old states loaded by overwritting the last states once home assistant
# old states loaded by overwriting the last states once Home Assistant
# has started and the old states have been read.
_async_dump_states()

View file

@ -1,4 +1,4 @@
"""API for NEW_NAME bound to HASS OAuth."""
"""API for NEW_NAME bound to Home Assistant OAuth."""
from asyncio import run_coroutine_threadsafe
from aiohttp import ClientSession

View file

@ -17,7 +17,7 @@ from tests.common import CLIENT_ID, MockUser, ensure_auth_manager_loaded, flush_
@pytest.fixture
def mock_hass(loop):
"""Hass mock with minimum amount of data set to make it work with auth."""
"""Home Assistant mock with minimum amount of data set to make it work with auth."""
hass = Mock()
hass.config.skip_pip = True
return hass

View file

@ -223,7 +223,7 @@ async def test_hassio_confirm(hass, aioclient_mock):
async def test_hassio_connection_error(hass, aioclient_mock):
"""Test we show hassio confirm form on AdGuard Home connection error."""
"""Test we show Hass.io confirm form on AdGuard Home connection error."""
aioclient_mock.get(
"http://mock-adguard:3000/control/status", exc=aiohttp.ClientError
)

View file

@ -78,7 +78,7 @@ async def test_set_up_oauth_no_external_url(hass, aioclient_mock):
async def test_set_up_hassio(hass, aioclient_mock):
"""Test we do not set up Almond to connect to HA if we use hassio."""
"""Test we do not set up Almond to connect to HA if we use Hass.io."""
entry = MockConfigEntry(
domain="almond",
data={
@ -97,7 +97,7 @@ async def test_set_up_hassio(hass, aioclient_mock):
async def test_set_up_local(hass, aioclient_mock):
"""Test we do not set up Almond to connect to HA if we use hassio."""
"""Test we do not set up Almond to connect to HA if we use Hass.io."""
entry = MockConfigEntry(
domain="almond",
data={"type": const.TYPE_LOCAL, "host": "http://localhost:9999"},

View file

@ -17,7 +17,7 @@ from tests.common import async_mock_service
@pytest.fixture
def mock_api_client(hass, hass_client):
"""Start the Hass HTTP component and return admin API client."""
"""Start the Home Assistant HTTP component and return admin API client."""
hass.loop.run_until_complete(async_setup_component(hass, "api", {}))
return hass.loop.run_until_complete(hass_client())

Some files were not shown because too many files have changed in this diff Show more