Esempio n. 1
0
def check_entity_sensors_temp(
    item: str,
    params: TempParamType,
    section: EntitySensorSection,
) -> CheckResult:
    if not (sensor_reading := section.get('temp', {}).get(item)):
        return
Esempio n. 2
0
def check_entity_sensors_power_presence(
    item: str,
    params: Mapping[str, Any],
    section: EntitySensorSection,
) -> CheckResult:
    if not (sensor_reading := section.get('power_presence', {}).get(item)):
        return
Esempio n. 3
0
def check_entity_sensors_fan(
    item: str,
    params: Mapping[str, Any],
    section: EntitySensorSection,
) -> CheckResult:
    if not (sensor_reading := section.get("fan", {}).get(item)):
        return
Esempio n. 4
0
def discover_entity_sensors_temp(
        section: EntitySensorSection) -> DiscoveryResult:
    yield from (Service(item=item) for item in section.get('temp', {}))
Esempio n. 5
0
def discover_entity_sensors_power_presence(
        section: EntitySensorSection) -> DiscoveryResult:
    yield from (Service(item=item)
                for item in section.get('power_presence', {}))