ESP-MQTT-JSON-Digital-LEDs icon indicating copy to clipboard operation
ESP-MQTT-JSON-Digital-LEDs copied to clipboard

Deprecated: input_slider

Open ghost opened this issue 8 years ago • 8 comments

input_slider should be replaced with input_number in the configuration.yaml file

ghost avatar Oct 18 '17 23:10 ghost

I've added this to my pull request here

timmo001 avatar Oct 19 '17 09:10 timmo001

When i replace both in .yaml in HA i get error when HA starts. That is the only place to change input_ slider to input_ number?

KodiMkd avatar Oct 20 '17 23:10 KodiMkd

Here is what I use that works:

input_number: animation_speed_livingroom_wall: name: "Animation Speed Livingroom Wall" initial: 5 min: 1 max: 150 step: 5

Additionally, automations changed too, so now you need to use "to" instead of "state" automation:

Livingroom Wall Speed Slider

  • alias: "Automation Animation Speed Livingroom Wall" initial_state: True hide_entity: False trigger:
    • platform: state entity_id: input_number.animation_speed_livingroom_wall action:
    • service: mqtt.publish data_template: topic: "bruh/walll/set" payload: '{"transition":{{ trigger.to_state.state | int }}}'

Eric2XU avatar Oct 22 '17 11:10 Eric2XU

input_number: Animatiesnelheid keuken: name: "1Animatiesnelheid" initial: 5 min: 1 max: 150 step: 5

  • alias: "Snelheid Keuken" initial_state: True hide_entity: False trigger:
    • platform: state entity_id: input_number.animatiesnelheid_keuken action:
    • service: mqtt.publish data_template: topic: "ledkeuken/ledkeuken/set" payload: '{"transition":{{ trigger.to_state.state | int }}}'

IT DOESNT WORK!!! PLEASE HELP

ghost avatar Oct 31 '17 16:10 ghost

can't be sure but I think Action needs to come back one level in indent. Action and Trigger are at the same level. BTW I HATE YAML, if I had one wish it would be to go to JSON as YAML SUCKS. Actually if I had one wish it would be to go back in into the past and do whatever would be required to make sure YAML never got created in the first place.

Here is code I use:

- alias: "Automation Animation Speed Playroom Wall" initial_state: True hide_entity: False **trigger**: - platform: state entity_id: input_number.animation_speed_playroom_wall **action**: - service: mqtt.publish data_template: topic: "bruh/wallp/set" payload: '{"transition":{{ trigger.to_state.state | int }}}'

Eric2XU avatar Oct 31 '17 17:10 Eric2XU

Ha... here is a screenshot.

untitled picture

Eric2XU avatar Oct 31 '17 17:10 Eric2XU

https://guides.github.com/features/mastering-markdown/2017-10-31 20:29:40 ERROR (MainThread) [homeassistant.config] Invalid config for [input_number]: [Animatiesnelheid keuken] is an invalid option for [input_number]. Check: input_number->input_number->Animatiesnelheid image image

euken. (See /config/configuration.yaml, line 95). Please check the docs at https://home-assistant.io/components/input_number/ 2017-10-31 20:29:40 ERROR (MainThread) [homeassistant.setup] Setup failed for input_number: Invalid config.

ghost avatar Oct 31 '17 19:10 ghost

can you see what the problem is?

ghost avatar Oct 31 '17 19:10 ghost