This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import annotations | |
| from dataclasses import dataclass | |
| from typing import Any, Final | |
| from zigpy import types as t | |
| from zigpy.quirks.v2 import QuirkBuilder, ReportingConfig | |
| from zigpy.quirks.v2.homeassistant import EntityType, UnitOfTime, UnitOfLength | |
| from zigpy.quirks.v2.homeassistant.binary_sensor import BinarySensorDeviceClass | |
| from zigpy.quirks.v2.homeassistant.number import NumberDeviceClass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "DlRx.h" | |
| namespace esphome | |
| { | |
| namespace dlbus | |
| { | |
| static constexpr uint16_t INIT_SAMPLES_MAX = 2000u; // number of rising edges to collect for | |
| static constexpr uint16_t INIT_SAMPLES_MIN = 100u; // collect at least this | |
| static constexpr float INIT_SAMPLES_RANGE = 0.03f; // Range of a valid bit period |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import appdaemon.plugins.hass.hassapi as hass | |
| from enum import Enum | |
| class State(Enum): | |
| Idle = 0 | |
| Nearby = 1 | |
| Detected = 2 | |
| Manual = 3 | |
| Cooldown = 4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import appdaemon.plugins.hass.hassapi as hass | |
| class ThermalPowerMeter(hass.Hass): | |
| def initialize(self): | |
| # Configuration from app arguments | |
| self._supply_temperature = self.args["supply_temperature"] | |
| self._return_temperature = self.args.get("return_temperature", None) | |
| self._return_difference = self.args.get("return_difference", 10) | |
| self.power_loss = self.args.get("power_loss", 11) # in percent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cover_controller_living: | |
| module: cover_controller | |
| class: CoverController | |
| cover_entities: | |
| - cover.living | |
| open_criteria: | |
| - binary_sensor.home | |
| - binary_sensor.daylight | |
| - schedule.awake | |
| override_position: |