mirror of
https://github.com/esphome/esphome.git
synced 2025-11-14 22:05:54 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ccab2bef9 | ||
|
|
475aa4879c | ||
|
|
4452473735 |
@@ -2,10 +2,10 @@
|
||||
|
||||
MAJOR_VERSION = 1
|
||||
MINOR_VERSION = 12
|
||||
PATCH_VERSION = '0'
|
||||
PATCH_VERSION = '1'
|
||||
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
|
||||
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
|
||||
ESPHOME_CORE_VERSION = '1.12.0'
|
||||
ESPHOME_CORE_VERSION = '1.12.1'
|
||||
|
||||
ESP_PLATFORM_ESP32 = 'ESP32'
|
||||
ESP_PLATFORM_ESP8266 = 'ESP8266'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from collections import OrderedDict
|
||||
import math
|
||||
|
||||
from esphome.core import CORE, HexInt, Lambda, TimePeriod, TimePeriodMicroseconds, \
|
||||
TimePeriodMilliseconds, TimePeriodSeconds, TimePeriodMinutes
|
||||
@@ -260,6 +261,8 @@ class FloatLiteral(Literal):
|
||||
self.float_ = value
|
||||
|
||||
def __str__(self):
|
||||
if math.isnan(self.float_):
|
||||
return u"NAN"
|
||||
return u"{:f}f".format(self.float_)
|
||||
|
||||
|
||||
|
||||
@@ -328,7 +328,7 @@ def represent_odict(dump, tag, mapping, flow_style=None):
|
||||
|
||||
|
||||
def represent_secret(value):
|
||||
return yaml.ScalarNode(tag=u'!secret', value=_SECRET_VALUES[value])
|
||||
return yaml.ScalarNode(tag=u'!secret', value=_SECRET_VALUES[text_type(value)])
|
||||
|
||||
|
||||
def unicode_representer(_, uni):
|
||||
|
||||
@@ -173,6 +173,7 @@ sensor:
|
||||
- 40.0 -> 45.0
|
||||
- 100.0 -> 102.5
|
||||
- filter_out: 42.0
|
||||
- filter_out: nan
|
||||
- sliding_window_moving_average:
|
||||
window_size: 15
|
||||
send_every: 15
|
||||
|
||||
Reference in New Issue
Block a user