diff --git a/atom.xml b/atom.xml index 5028df106f..6afcfef9b0 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@
mode: box
-Configuration variables:
-box
, or slider
. Defaults to slider
.(map)(Required)Alias for the input. Multiple entries are allowed.
+(float)(Required)Minimum value.
+(float)(Required)Maxium value.
+(string)(Optional)Friendly name of the input.
+(float)(Optional)Initial value when Home Assistant starts.
+Default value: 0
+(float)(Optional)Step value for the slider. Smallest value 0.001
.
Default value: 1
+( )(Optional)Can specify box
or slider
.
Default value: slider
+(string)(Optional)Unit of measurement in which the value of the slider is expressed in.
+(icon)(Optional)Icon to display in front of the box/slider in the frontend. Refer to the Customizing devices page for possible values.
+Here’s an example of input_number
being used as a trigger in an automation.
# Example configuration.yaml entry using 'input_number' as a trigger in an automation
@@ -131,8 +164,7 @@ Before version 0.55 this component was known as
# Note the use of 'data_template:' below rather than the normal 'data:' if you weren't using an input variable
data_template:
entity_id: light.bedroom
- brightness: '{{ trigger.to_state.state | int }}'
-
+ brightness: "{{ trigger.to_state.state | int }}"
Another code example using input_number
, this time being used in an action in an automation.
# Again, note the use of 'data_template:' rather than the normal 'data:' if you weren't using an input variable.
data_template:
entity_id: light.bedroom
- brightness: '{{ states.input_number.bedroom_brightness.state | int }}'
+ brightness: "{{ states('input_number.bedroom_brightness') | int }}"
Example of input_number
being used in a bidirectional manner, both being set by and controlled by an MQTT action in an automation.
step: 1
unit_of_measurement: step
icon: mdi:target
+
# This automation script runs when a value is received via MQTT on retained topic: setTemperature
# It sets the value slider on the GUI. This slides also had its own automation when the value is changed.
automation:
- alias: Set temp slider
trigger:
platform: mqtt
- topic: "setTemperature"
+ topic: 'setTemperature'
action:
service: input_number.set_value
data_template:
entity_id: input_number.target_temp
- value: '{{ trigger.payload}}'
+ value: "{{ trigger.payload }}"
+
# This automation script runs when the target temperature slider is moved.
# It publishes its value to the same MQTT topic it is also subscribed to.
+automation:
- alias: Temp slider moved
trigger:
platform: state
@@ -200,9 +235,9 @@ Before version 0.55 this component was known as
action:
service: mqtt.publish
data_template:
- topic: "setTemperature"
+ topic: 'setTemperature'
retain: true
- payload: '{{ states.input_number.target_temp.state | int }}'
+ payload: "{{ states('input_number.target_temp') | int }}"
diff --git a/sitemap.xml b/sitemap.xml
index 41bde2833e..5bb3cd6ceb 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -3826,7 +3826,7 @@
https://home-assistant.io/components/switch.hook/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/cookbook/automation_for_rainy_days/
@@ -4502,99 +4502,99 @@
https://home-assistant.io/docs/autostart/init.d/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/api/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/configuration/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/example_apps/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/installation/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/operation/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/reboot/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/running/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/tutorial/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/updating/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/ecosystem/appdaemon/windows/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/ecosystem/certificates/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/ecosystem/hadashboard/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/ecosystem/hass-configurator/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/ecosystem/ios/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/ecosystem/nginx/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/ecosystem/notebooks/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/ecosystem/scenegen/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/ecosystem/synology/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/tools/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/tools/dev-tools/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/tools/hass/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/docs/tools/scripts/
-2017-12-24T13:42:39+00:00
+2017-12-24T16:18:47+00:00
https://home-assistant.io/faq/after-upgrading/
@@ -5726,62 +5726,62 @@
https://home-assistant.io/demo/frontend.html
-2017-12-24T13:41:39+00:00
+2017-12-24T16:17:57+00:00
https://home-assistant.io/demo/index.html
-2017-12-24T13:41:39+00:00
+2017-12-24T16:17:57+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-event.html
-2017-12-24T13:41:39+00:00
+2017-12-24T16:17:57+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-info.html
-2017-12-24T13:41:39+00:00
+2017-12-24T16:17:57+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-service.html
-2017-12-24T13:41:39+00:00
+2017-12-24T16:17:57+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-state.html
-2017-12-24T13:41:39+00:00
+2017-12-24T16:17:57+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-template.html
-2017-12-24T13:41:39+00:00
+2017-12-24T16:17:57+00:00
https://home-assistant.io/demo/panels/ha-panel-history.html
-2017-12-24T13:41:39+00:00
+2017-12-24T16:17:57+00:00
https://home-assistant.io/demo/panels/ha-panel-iframe.html
-2017-12-24T13:41:39+00:00
+2017-12-24T16:17:57+00:00
https://home-assistant.io/demo/panels/ha-panel-logbook.html
-2017-12-24T13:41:39+00:00
+2017-12-24T16:17:57+00:00
https://home-assistant.io/demo/panels/ha-panel-map.html
-2017-12-24T13:41:39+00:00
+2017-12-24T16:17:57+00:00
https://home-assistant.io/googlef4f3693c209fe788.html
-2017-12-24T13:41:39+00:00
+2017-12-24T16:17:57+00:00
https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html
-2017-12-24T13:41:40+00:00
+2017-12-24T16:17:57+00:00
https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html
-2017-12-24T13:41:40+00:00
+2017-12-24T16:17:57+00:00
https://home-assistant.io/static/mdi-demo.html
-2017-12-24T13:41:40+00:00
+2017-12-24T16:17:57+00:00