All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.zeroone3010.yahueapi.DaylightSensorImpl Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc
Show newest version
package io.github.zeroone3010.yahueapi;

import com.fasterxml.jackson.databind.ObjectMapper;
import io.github.zeroone3010.yahueapi.domain.SensorDto;

import java.net.URL;

final class DaylightSensorImpl extends BasicSensor implements DaylightSensor {
  DaylightSensorImpl(final String id, final SensorDto sensor, final URL url, final ObjectMapper objectMapper) {
    super(id, sensor, url, objectMapper);
  }

  @Override
  public String toString() {
    return "DaylightSensor{" +
        "id='" + super.id + '\'' +
        ", name='" + super.name + '\'' +
        ", type=" + super.type +
        '}';
  }

  @Override
  public boolean isDaylightTime() {
    return readStateValue("daylight", Boolean.class);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy