Skip to content

Commit

Permalink
Minor update of some code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldotnl committed May 27, 2021
1 parent 98f32d3 commit 738e171
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions custom_components/multiscrape/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""The rest component."""
"""The multiscrape component."""
import asyncio
import logging
from datetime import timedelta
Expand Down Expand Up @@ -47,7 +47,7 @@


async def async_setup(hass: HomeAssistant, config: dict):
"""Set up the rest platforms."""
"""Set up the multiscrape platforms."""
component = EntityComponent(_LOGGER, DOMAIN, hass)
_async_setup_shared_data(hass)

Expand Down
10 changes: 5 additions & 5 deletions custom_components/multiscrape/binary_sensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Support for RESTful binary sensors."""
"""Support for multiscrape binary sensors."""
import logging

from homeassistant.components.binary_sensor import BinarySensorEntity
Expand All @@ -20,7 +20,7 @@


async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the REST binary sensor."""
"""Set up the multiscrape binary sensor."""
# Must update the sensor now (including fetching the rest resource) to
# ensure it's updating its state.
if discovery_info is not None:
Expand Down Expand Up @@ -67,7 +67,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=


class RestBinarySensor(MultiscrapeEntity, BinarySensorEntity):
"""Representation of a REST binary sensor."""
"""Representation of a multiscrape binary sensor."""

def __init__(
self,
Expand All @@ -83,7 +83,7 @@ def __init__(
attribute,
index,
):
"""Initialize a REST binary sensor."""
"""Initialize a multiscrape binary sensor."""
super().__init__(
coordinator, rest, name, device_class, resource_template, force_update
)
Expand All @@ -107,7 +107,7 @@ def is_on(self):
return self._is_on

def _update_from_rest_data(self):
"""Update state from the rest data."""
"""Update state from the scraped data."""

if self.rest.soup is None:
self._is_on = False
Expand Down
2 changes: 1 addition & 1 deletion custom_components/multiscrape/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


class MultiscrapeEntity(RestEntity):
"""A class for entities using DataUpdateCoordinator or rest data directly."""
"""A class for entities using DataUpdateCoordinator."""

def __init__(
self,
Expand Down
2 changes: 1 addition & 1 deletion custom_components/multiscrape/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"requirements": ["lxml", "beautifulsoup4==4.9.3"],
"dependencies": ["rest"],
"config_flow": false,
"version": "3.0.0",
"version": "4.0.0",
"codeowners": ["@danieldotnl"],
"iot_class": "local_polling"
}
2 changes: 1 addition & 1 deletion custom_components/multiscrape/schema.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""The rest component schemas."""
"""The multiscrape component schemas."""
import homeassistant.helpers.config_validation as cv
import voluptuous as vol
from homeassistant.components.binary_sensor import (
Expand Down
6 changes: 3 additions & 3 deletions custom_components/multiscrape/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the RESTful sensor."""
"""Set up the multiscrape sensor."""
# Must update the sensor now (including fetching the rest resource) to
# ensure it's updating its state.
if discovery_info is not None:
Expand Down Expand Up @@ -70,7 +70,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=


class RestSensor(MultiscrapeEntity, SensorEntity):
"""Implementation of a REST sensor."""
"""Implementation of a multiscrape sensor."""

def __init__(
self,
Expand All @@ -87,7 +87,7 @@ def __init__(
attribute,
index,
):
"""Initialize the REST sensor."""
"""Initialize the multiscrape sensor."""
super().__init__(
coordinator, rest, name, device_class, resource_template, force_update
)
Expand Down

0 comments on commit 738e171

Please sign in to comment.