mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 09:18:00 +01:00
parent
b4ec84030e
commit
25d04c759c
4 changed files with 5 additions and 5 deletions
|
@ -25,4 +25,4 @@ def to_code(config):
|
||||||
|
|
||||||
wwhite = yield cg.get_variable(config[CONF_WARM_WHITE])
|
wwhite = yield cg.get_variable(config[CONF_WARM_WHITE])
|
||||||
cg.add(var.set_warm_white(wwhite))
|
cg.add(var.set_warm_white(wwhite))
|
||||||
cg.add(var.set_warm_white_temperature(config[CONF_COLD_WHITE_COLOR_TEMPERATURE]))
|
cg.add(var.set_warm_white_temperature(config[CONF_WARM_WHITE_COLOR_TEMPERATURE]))
|
||||||
|
|
|
@ -103,7 +103,7 @@ class SunTrigger : public Trigger<>, public PollingComponent, public Parented<Su
|
||||||
crossed = this->last_elevation_ >= this->elevation_ && this->elevation_ > current;
|
crossed = this->last_elevation_ >= this->elevation_ && this->elevation_ > current;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (crossed) {
|
if (crossed && !isnan(this->last_elevation_)) {
|
||||||
this->trigger();
|
this->trigger();
|
||||||
}
|
}
|
||||||
this->last_elevation_ = current;
|
this->last_elevation_ = current;
|
||||||
|
@ -111,7 +111,7 @@ class SunTrigger : public Trigger<>, public PollingComponent, public Parented<Su
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool sunrise_;
|
bool sunrise_;
|
||||||
double last_elevation_;
|
double last_elevation_{NAN};
|
||||||
double elevation_;
|
double elevation_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -469,7 +469,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="footer-copyright">
|
<div class="footer-copyright">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
© 2019 Copyright Otto Winter, Made with <a class="grey-text text-lighten-4" href="https://materializecss.com/" target="_blank">Materialize</a>
|
© 2019 Copyright ESPHome, Made with <a class="grey-text text-lighten-4" href="https://materializecss.com/" target="_blank">Materialize</a>
|
||||||
<a class="grey-text text-lighten-4 right" href="{{ docs_link }}" target="_blank" rel="noreferrer">ESPHome {{ version }} Documentation</a>
|
<a class="grey-text text-lighten-4 right" href="{{ docs_link }}" target="_blank" rel="noreferrer">ESPHome {{ version }} Documentation</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="footer-copyright">
|
<div class="footer-copyright">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
© 2019 Copyright Otto Winter, Made with <a class="grey-text text-lighten-4" href="https://materializecss.com/" target="_blank">Materialize</a>
|
© 2019 Copyright ESPHome, Made with <a class="grey-text text-lighten-4" href="https://materializecss.com/" target="_blank">Materialize</a>
|
||||||
<a class="grey-text text-lighten-4 right" href="{{ docs_link }}"
|
<a class="grey-text text-lighten-4 right" href="{{ docs_link }}"
|
||||||
target="_blank">ESPHome {{ version }} Documentation</a>
|
target="_blank">ESPHome {{ version }} Documentation</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue