Skip to content

Commit

Permalink
Be consistent with Home Assistant and Hass.io spelling (home-assistan…
Browse files Browse the repository at this point in the history
…t#30500)

* Be consistent with Home Assistant spelling

* Be consistent with Hass.io spelling
  • Loading branch information
scop authored Jan 5, 2020
1 parent 24b25b8 commit 5216477
Show file tree
Hide file tree
Showing 139 changed files with 189 additions and 189 deletions.
4 changes: 2 additions & 2 deletions homeassistant/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def check_pid(pid_file: str) -> None:
except OSError:
# PID does not exist
return
print("Fatal Error: HomeAssistant is already running.")
print("Fatal Error: Home Assistant is already running.")
sys.exit(1)


Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/auth/providers/homeassistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ async def async_save(self) -> None:

@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"

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/abode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/abode/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def turn_on(self, **kwargs):
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:
Expand All @@ -78,7 +78,7 @@ def brightness(self):
# 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
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/aftership/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -93,7 +93,7 @@ async def handle_add_tracking(call):
)

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]

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/airvisual/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def state(self):

@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
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/alert/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def name(self):

@property
def should_poll(self):
"""HASS need not poll these entities."""
"""Home Assistant need not poll these entities."""
return False

@property
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/august/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def close_http_session(event):
_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)

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/automation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ async def async_trigger(self, variables, skip_condition=False, context=None):
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()

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/bbb_gpio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def cleanup_gpio(event):
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)
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/beewi_smartclim/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def device_class(self):

@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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self, see, vehicle):
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)
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/buienradar/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ async def async_camera_image(self) -> Optional[bytes]:
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.
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/buienradar/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
timeframe = config.get(CONF_TIMEFRAME, DEFAULT_TIMEFRAME)

if None in (latitude, longitude):
_LOGGER.error("Latitude or longitude not set in HomeAssistant config")
_LOGGER.error("Latitude or longitude not set in Home Assistant config")
return False

coordinates = {CONF_LATITUDE: float(latitude), CONF_LONGITUDE: float(longitude)}
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/cloud/stt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/deconz/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/dlna_dmr/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def available(self):
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()

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/downloader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/ecobee/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

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",
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/ecovacs/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/egardia/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def handle_stop_event(event):
"""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:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/elgato/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Integration domain
DOMAIN = "elgato"

# Hass data keys
# Home Assistant data keys
DATA_ELGATO_CLIENT = "elgato_client"

# Attributes
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/emulated_hue/upnp.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def get(self, request):
<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>
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/ephember/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ def update(self):

@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)
2 changes: 1 addition & 1 deletion homeassistant/components/flunearyou/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def state(self):

@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
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/futurenow/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/group/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,12 +582,12 @@ async def async_update(self):
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
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/group/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def async_state_changed_listener(
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
Expand Down
6 changes: 3 additions & 3 deletions homeassistant/components/hassio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down Expand Up @@ -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])

Expand Down Expand Up @@ -219,7 +219,7 @@ async def async_service_handler(service):
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]:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/here_travel_time/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ async def async_added_to_hass(self) -> None:

@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(
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/homeassistant/scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def _ensure_no_intersection(value):


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.
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/homekit/type_media_players.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ def update_state(self, new_state):
self.char_input_source.set_value(index)
else:
_LOGGER.warning(
"%s: Sources out of sync. Restart HomeAssistant",
"%s: Sources out of sync. Restart Home Assistant",
self.entity_id,
)
self.char_input_source.set_value(0)
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/homekit_controller/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def async_set_unavailable(self):
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):
Expand Down
8 changes: 4 additions & 4 deletions homeassistant/components/homematic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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),
Expand All @@ -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,
Expand Down Expand Up @@ -969,7 +969,7 @@ def _hm_event_callback(self, device, caller, attribute, value):
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()

Expand Down
Loading

0 comments on commit 5216477

Please sign in to comment.