示例#1
0
def check_entity_sensors_temp(
    item: str,
    params: TempParamType,
    section: EntitySensorSection,
) -> CheckResult:
    if not (sensor_reading := section.get('temp', {}).get(item)):
        return
示例#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
示例#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
示例#4
0
def discover_entity_sensors_temp(
        section: EntitySensorSection) -> DiscoveryResult:
    yield from (Service(item=item) for item in section.get('temp', {}))
示例#5
0
def discover_entity_sensors_power_presence(
        section: EntitySensorSection) -> DiscoveryResult:
    yield from (Service(item=item)
                for item in section.get('power_presence', {}))