<commit_before>"""
homeassistant.components.sensor.demo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Demo platform that has a couple of fake sensors.
"""
from homeassistant.helpers.entity import Entity
from homeassistant.const import TEMP_CELCIUS, ATTR_BATTERY_LEVEL


# pylint: disable=unused-argument
def setup_platform(hass, config, add_devices, discovery_info=None):
    """ Sets up the Demo sensors. """
    add_devices([
        DemoSensor('Outside Temperature', 15.6, TEMP_CELCIUS, 12),
        DemoSensor('Outside Humidity', 54, '%', None),
        DemoSensor('Alarm back', 'Armed', None, None),
    ])


class DemoSensor(Entity):
    """ A Demo sensor. """

    def __init__(self, name, state, unit_of_measurement, battery):
        self._name = name
        self._state = state
        self._unit_of_measurement = unit_of_measurement
        self._battery = battery

    @property<commit_msg>Remove alarm sensor from demo platform<commit_after>"""
homeassistant.components.sensor.demo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Demo platform that has a couple of fake sensors.
"""
from homeassistant.helpers.entity import Entity
from homeassistant.const import TEMP_CELCIUS, ATTR_BATTERY_LEVEL


# pylint: disable=unused-argument
def setup_platform(hass, config, add_devices, discovery_info=None):
    """ Sets up the Demo sensors. """
    add_devices([
        DemoSensor('Outside Temperature', 15.6, TEMP_CELCIUS, 12),
        DemoSensor('Outside Humidity', 54, '%', None),
    ])


class DemoSensor(Entity):
    """ A Demo sensor. """

    def __init__(self, name, state, unit_of_measurement, battery):
        self._name = name
        self._state = state
        self._unit_of_measurement = unit_of_measurement
        self._battery = battery

    @property
{'fraction_non_alphanumeric': 0.14334470989761092, 'fraction_numerical': 0.007963594994311717, 'mean_word_length': 3.9830028328611897, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5511966', 'n_tokens_mistral': 550, 'n_tokens_neox': 517, 'n_words': 133}