Skip to content

Commit

Permalink
Fix minor typos in comments and log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
rhumbertgz committed Feb 8, 2020
1 parent f5f345c commit 22a2191
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions appdaemon/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def handle_sig(self, signum, frame):
self.logger.info("Keyboard interrupt")
self.stop()
if signum == signal.SIGTERM:
self.logger.info("SIGTERM Recieved")
self.logger.info("SIGTERM Received")
self.stop()

def stop(self):
Expand Down Expand Up @@ -389,7 +389,7 @@ def main(self): # noqa: C901
with pid.PidFile(name, dir):
self.run(appdaemon, hadashboard, admin, api, http)
except pid.PidFileError:
self.logger.error("Unable to aquire pidfile - terminating")
self.logger.error("Unable to acquire pidfile - terminating")
else:
self.run(appdaemon, hadashboard, admin, api, http)

Expand Down
4 changes: 2 additions & 2 deletions appdaemon/adapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ async def register_route(self, callback, route=None, **kwargs):
token (str, optional): A previously registered token can be passed with the api call, which
can be used to secure the app route. This allows for different security credentials to be used across different
app routes. It should be noted that if a device has already registered using AD's Admin UI's password
and a cookie has been stored by the broswer, that device will bypass the token and still access the web server.
and a cookie has been stored by the browser, that device will bypass the token and still access the web server.
Returns:
A handle that can be used to remove the registration.
Expand Down Expand Up @@ -1468,7 +1468,7 @@ async def call_service(self, service, **kwargs):
"""Calls a Service within AppDaemon.
This function can call any service and provide any required parameters.
By default, there are stardard services that can be called within AD. Other
By default, there are standard services that can be called within AD. Other
services that can be called, are dependent on the plugin used, or those registered
by individual apps using the `register_service` api.
In a future release, all available services can be found using AD's Admin UI.
Expand Down
2 changes: 1 addition & 1 deletion appdaemon/app_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ def get_app_deps_and_prios(self, applist, mode):
deplist.append(app)
self.get_dependent_apps(app, deplist)

# Need to gove the topological sort a full list of apps or it will fail
# Need to give the topological sort a full list of apps or it will fail
full_list = list(self.app_config.keys())

deps = []
Expand Down
2 changes: 1 addition & 1 deletion appdaemon/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ def get_dashboard(self, name, skin, recompile):
dash = self._conditional_compile(name, skin, recompile)

if dash is None:
errors = ["An unrecoverable error occured - check log for details"]
errors = ["An unrecoverable error occurred - check log for details"]
else:
errors = dash["errors"]

Expand Down
2 changes: 1 addition & 1 deletion appdaemon/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ async def logon_response(self, request):
password = data["password"]

if password == self.password:
self.access.info("Succesful logon from %s", request.host)
self.access.info("Successful logon from %s", request.host)
hashed = bcrypt.hashpw(str.encode(self.password), bcrypt.gensalt(self.work_factor))
if self.admin is not None:
response = await self._admin_page(request)
Expand Down
8 changes: 4 additions & 4 deletions appdaemon/plugins/hass/hassapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ async def everyone_home(self, **kwargs):
Examples:
>>> if self.everyone_home():
>>> do something
>>> if self.everyone_home(perosn=True):
>>> if self.everyone_home(person=True):
>>> do something
"""
Expand Down Expand Up @@ -341,7 +341,7 @@ def constrain_input_select(self, value):
async def turn_on(self, entity_id, **kwargs):
"""Turns `on` a Home Assistant entity.
This is a convenience function for the ``homassistant.turn_on``
This is a convenience function for the ``homeassistant.turn_on``
function. It can turn ``on`` pretty much anything in Home Assistant
that can be turned ``on`` or ``run`` (e.g., `Lights`, `Switches`,
`Scenes`, `Scripts`, etc.).
Expand Down Expand Up @@ -392,7 +392,7 @@ async def turn_on(self, entity_id, **kwargs):
async def turn_off(self, entity_id, **kwargs):
"""Turns `off` a Home Assistant entity.
This is a convenience function for the ``homassistant.turn_off``
This is a convenience function for the ``homeassistant.turn_off``
function. It can turn ``off`` pretty much anything in Home Assistant
that can be turned ``off`` (e.g., `Lights`, `Switches`, etc.).
Expand Down Expand Up @@ -441,7 +441,7 @@ async def turn_off(self, entity_id, **kwargs):
async def toggle(self, entity_id, **kwargs):
"""Toggles between ``on`` and ``off`` for the selected entity.
This is a convenience function for the ``homassistant.toggle`` function.
This is a convenience function for the ``homeassistant.toggle`` function.
It is able to flip the state of pretty much anything in Home Assistant
that can be turned ``on`` or ``off``.
Expand Down
14 changes: 7 additions & 7 deletions appdaemon/plugins/mqtt/mqttapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def initialize(self):
- ``Subscribe``
- ``Unsubscribe``
By simply specifing within the function what is to be done. It uses configuration specified in the plugin configuration which simplifies the call within the app significantly. Different brokers can be accessed within an app, as long as they are all declared
By simply specifying within the function what is to be done. It uses configuration specified in the plugin configuration which simplifies the call within the app significantly. Different brokers can be accessed within an app, as long as they are all declared
when the plugins are configured, and using the ``namespace`` parameter.
Examples
Expand Down Expand Up @@ -109,23 +109,23 @@ async def listen_event(self, callback, event=None, **kwargs):
Examples:
Listen all events.
>>> self.listen_event(self.mqtt_message_recieved_event, "MQTT_MESSAGE")
>>> self.listen_event(self.mqtt_message_received_event, "MQTT_MESSAGE")
Listen events for a specific subscribed topic.
>>> self.listen_event(self.mqtt_message_recieved_event, "MQTT_MESSAGE", topic = 'homeassistant/bedroom/light')
>>> self.listen_event(self.mqtt_message_received_event, "MQTT_MESSAGE", topic = 'homeassistant/bedroom/light')
Listen events for a specific subscribed high level topic.
>>> self.listen_event(self.mqtt_message_recieved_event, "MQTT_MESSAGE", wildcard = 'homeassistant/#')
>>> self.listen_event(self.mqtt_message_received_event, "MQTT_MESSAGE", wildcard = 'homeassistant/#')
Listen plugin's `disconnected` events from the broker.
>>> self.listen_event(self.mqtt_message_recieved_event, "MQTT_MESSAGE", state = 'Disconnected', topic = None)
>>> self.listen_event(self.mqtt_message_received_event, "MQTT_MESSAGE", state = 'Disconnected', topic = None)
Listen plugin's' `connected` events from the broker.
>>> self.listen_event(self.mqtt_message_recieved_event, "MQTT_MESSAGE", state = 'Connected', topic = None)
>>> self.listen_event(self.mqtt_message_received_event, "MQTT_MESSAGE", state = 'Connected', topic = None)
Notes:
At this point, it is not possible to use single level wildcard like using ``homeassistant/+/light`` instead of ``homeassistant/bedroom/light``. This could be added later, if need be.
Expand Down Expand Up @@ -188,7 +188,7 @@ def mqtt_publish(self, topic, payload=None, **kwargs):
Send data to a different broker.
>>> self.mqtt_publish("homeassistant/living_room/light", "ON", qos = 0, retain = True, namepace = "mqtt2")
>>> self.mqtt_publish("homeassistant/living_room/light", "ON", qos = 0, retain = True, namespace = "mqtt2")
"""

Expand Down
2 changes: 1 addition & 1 deletion appdaemon/stream/adstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ async def _request(self, rawmsg):
except RequestHandlerException as e:
return await self._response_error(msg, str(e))
except Exception as e:
await self._response_error(msg, "Unknown error occured, check AppDaemon logs: {}".format(str(e)))
await self._response_error(msg, "Unknown error occurred, check AppDaemon logs: {}".format(str(e)))
raise

async def _check_adcookie(self, cookie):
Expand Down
2 changes: 1 addition & 1 deletion conf/example_apps/ObjectTracker/objectcontrole.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# total_objects = the amount off object you want to track #
# object1 = HA entity_ID without the platform part. (for switch.light1 use light1) #
# object2 = ... #
# object3 = untill you reached youre total_object amount #
# object3 = until you reached you're total_object amount #
# #
# note that you need to set a new sections in the cfg for each type of object you like #
# to track. if you want to track 1 switch and 1 sensor you need to make to sections. #
Expand Down
2 changes: 1 addition & 1 deletion conf/example_apps/dark_day.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def initialize(self):

def light_event(self, entity, attribute, old, new, kwargs):
lux = float(new)
# Can't use a contraint for this because if self.active = true when the constraint kicks in it will never get cleared
# Can't use a constraint for this because if self.active = true when the constraint kicks in it will never get cleared
# and the program will ignore future changes
if self.now_is_between(self.args["start_time"], self.args["end_time"]):
if lux < 200 and not self.active:
Expand Down
6 changes: 3 additions & 3 deletions docs/DASHBOARD_INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ called ``Hello.dash`` and paste in the following:
- label(2x2)
When you have added the lines to the config and created the dashboards
directory and test dashbboard, restart AppDaemon and you will be ready
directory and test dashboard, restart AppDaemon and you will be ready
to go. If you navigate to the top level, e.g.,
``http://192.168.1.20:5050`` in the case above, you will see a welcome
page with a list of configured dashboards. If you haven't yet configured
Expand All @@ -70,7 +70,7 @@ any the list will be empty.
When you have created a dashboard you can navigate to it by going to
``http://192.168.1.20:5050/<Dashboard Name>``

If you are using AppDaemon just for the dasboard and not the Apps, you
If you are using AppDaemon just for the dashboard and not the Apps, you
can disable the app engine with the following directive:

.. code:: yaml
Expand All @@ -82,7 +82,7 @@ This will free up some CPU and memory.

HADashboard pre-compiles all of the user created Dashboard for
efficiency. It will detect when changes have been made to widgets,
styles or dahsboards and automatically recompile. This is usually
styles or dashboards and automatically recompile. This is usually
desirable as compilation can take several seconds on slower hardware for
a fully loaded dashboard, however to force a recompilation every time,
use the following directive:
Expand Down
2 changes: 1 addition & 1 deletion docs/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ None
- Added initial version of the Admin Interface
- Added User Defined Namespaces
- Rewrote logging to include user defined logs and formats
- Added a unified http component to handle API, ADMIN and DASBOARD access on a single port
- Added a unified http component to handle API, ADMIN and DASHBOARD access on a single port
- Added startup conditions to the HASS plugin
- Added duplicate filtering for logs
- Added standalone pidfile functionality
Expand Down
2 changes: 1 addition & 1 deletion docs/INSTALL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ AppDaemon arguments
optional arguments:
-h, --help show this help message and exit
-c CONFIG, --config CONFIG
full path to config diectory
full path to config directory
-p PIDFILE, --pidfile PIDFILE
full path to PID File
-t TIMEWARP, --timewarp multiplication factor for the scheduler time (see Time TraveL)
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
# The encoding of source files.
# source_encoding = 'utf-8-sig'

# The master toctree document.
# The master doctree document.
master_doc = "index"

# General information about the project.
Expand Down Expand Up @@ -276,7 +276,7 @@
"AppDaemon Documentation",
author,
"AppDaemon",
"Sandboxed pyhton Apps for automation",
"Sandboxed python Apps for automation",
"Miscellaneous",
),
]
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.. AppDaemon documentation master file, created by
sphinx-quickstart on Fri Aug 11 14:36:18 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
contain the root `doctree` directive.
Welcome to AppDaemon's documentation!
=====================================

AppDaemon is a loosely coupled, multithreaded, sandboxed python
AppDaemon is a loosely coupled, multi-threaded, sandboxed python
execution environment for writing automation apps for home automation projects, and any environment that requires a robust event driven architecture.

Out of the box, AppDaemon has support for the following automation products:
Expand Down

0 comments on commit 22a2191

Please sign in to comment.