Skip to content

Commit 5c3db5e

Browse files
committed
.value -> .state
1 parent da72681 commit 5c3db5e

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

esphomeyaml/components/logger.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ In the ``format`` option, you can use ``printf``-style formatting (see :ref:`dis
120120
# Formatted:
121121
- logger.log:
122122
format: "The temperature sensor reports value %.1f and humidity %.1f"
123-
args: [ 'id(temperature_sensor).value', 'id(humidity_sensor).value' ]
123+
args: [ 'id(temperature_sensor).state', 'id(humidity_sensor).state' ]
124124
125125
Configuration options:
126126

esphomeyaml/components/mqtt.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ as seen below.
463463
- mqtt.publish_json:
464464
topic: the/topic
465465
payload: |-
466-
root["key"] = id(my_sensor).value;
466+
root["key"] = id(my_sensor).state;
467467
root["greeting"] = "Hello World";
468468
469469
# Will produce:
@@ -494,7 +494,7 @@ Configuration options:
494494
.. code-block:: cpp
495495
496496
id(mqtt_client).publish_json("the/topic", [=](JsonObject &root) {
497-
root["something"] = id(my_sensor).value;
497+
root["something"] = id(my_sensor).state;
498498
});
499499
500500

esphomeyaml/components/stepper/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ position (in steps). The stepper will always run towards the target position and
122122
- stepper.set_target:
123123
id: my_stepper
124124
target: !lambda |-
125-
if (id(my_binary_sensor).value) {
125+
if (id(my_binary_sensor).state) {
126126
return 1000;
127127
} else {
128128
return -1000;
@@ -173,7 +173,7 @@ the target again.
173173
- stepper.report_position:
174174
id: my_stepper
175175
position: !lambda |-
176-
if (id(my_binary_sensor).value) {
176+
if (id(my_binary_sensor).state) {
177177
return 0;
178178
} else {
179179
return -1000;

esphomeyaml/components/text_sensor/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Text Sensor Automation
3636
----------------------
3737

3838
You can access the most recent state of the sensor in :ref:`lambdas <config-lambda>` using
39-
``id(sensor_id).value``.
39+
``id(sensor_id).state``.
4040

4141
.. _text_sensor-on_value:
4242

esphomeyaml/components/text_sensor/mqtt_subscribe.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ MQTT Subscribe Text Sensor
88

99
The ``mqtt_subscribe`` text sensor platform allows you to get external data into esphomelib.
1010
The sensor will subscribe to messages on the given MQTT topic and save the most recent value
11-
in its ``id(mysensor).value``.
11+
in its ``id(mysensor).state``.
1212

1313
.. code-block:: yaml
1414

0 commit comments

Comments
 (0)