ashscott
(Ash)
April 22, 2019, 9:15am
103
You have them both with the same name.
awning_position is the name I gave it. You can name yours anything you like but they must be different from each other.
input_number:
awning_position:
name: Awning Position
icon: mdi:map-marker-distance
initial: 0
min: 0
max: 100
step: 10
#Estore slider
awning_position_1:
name: Awning Position 1
icon: mdi:map-marker-distance
initial: 0
min: 0
max: 100
step: 10
ashscott
(Ash)
April 22, 2019, 9:20am
105
You need the indentation.
mclaudiopt
(Mclaudiopt)
April 22, 2019, 9:22am
106
apparently it will workā¦ if all ok i will post full instructions for other users ok?
ashscott
(Ash)
April 22, 2019, 9:30am
107
Glad you got it sorted.
What instructions was I missing?
mclaudiopt
(Mclaudiopt)
April 22, 2019, 9:33am
108
hi thereā¦well it does not work
automation is:
alias: āPosiĆ§Ć£o estore Suiteā
initial_state: āonā
trigger:
platform: state
entity_id: input_number.awning_position_suite
action:
- delay: ā00:00:3ā
service: mqtt.publish
data_template:
topic: āshellies/shellyswitch25-73C369/roller/0/command/posā
retain: true
payload: ā{{ states(āinput_number.awning_position_suiteā) | int }}ā
and configuration yaml is:
input_number:
awning_position_suite:
name: Posicao estore suite
icon: mdi:map-marker-distance
initial: 0
min: 0
max: 100
step: 10
#Estore slider
posica_estore_suite:
name: Posicao estore suite
icon: mdi:map-marker-distance
initial: 0
min: 0
max: 100
step: 10
what am i doing wrong?
ashscott
(Ash)
April 22, 2019, 9:38am
109
You need to format you code for it to be read correctly:
- alias: 'Set awning position'
initial_state: 'on'
trigger:
- platform: state
entity_id: input_number.awning_position
action:
# - delay: '00:00:3'
- service: mqtt.publish
data_template:
topic: 'shellies/shellyswitch-559C7E/roller/0/command/pos'
retain: true
payload: "{{ states('input_number.awning_position') | int }}"
ashscott
(Ash)
April 22, 2019, 9:44am
110
You have no indentation, thatās the first place to start.
If you format the code so it displays correctly itāll be easier to help you.
ashscott
(Ash)
April 22, 2019, 9:48am
111
mclaudiopt:
what am i doing wrong?
Do you mean it doesnāt do what you expect or itās doesnāt pass config check?
Does it display in the front end?
mclaudiopt
(Mclaudiopt)
April 22, 2019, 9:55am
112
hi
so it passes the config and can add the slider on the UI
config:
input_number:
awning_position:
name: Posicao estore suite
icon: mdi:map-marker-distance
initial: 0
min: 0
max: 100
step: 10
#Estore slider
posica_estore_suite:
name: Posicao estore suite
icon: mdi:map-marker-distance
initial: 0
min: 0
max: 100
step: 10
automation file yaml:
- alias: 'Set awning position'
initial_state: 'on'
trigger:
- platform: state
entity_id: input_number.awning_position
action:
# - delay: '00:00:3'
- service: mqtt.publish
data_template:
topic: 'shellies/shellyswitch-559C7E/roller/0/command/pos'
retain: true
payload: "{{ states('input_number.awning_position') | int }}"
thanks
ashscott
(Ash)
April 22, 2019, 9:59am
113
You need to format all of the code.
Indentation is not correct for the input_number:
Everything below input_number needs to move right.
Or input_number needs to move left. Itās difficult to tell with the formatting as is.
ashscott
(Ash)
April 22, 2019, 10:02am
114
Thatās better. Move the input_number left.
When you say itās not working, what is happening?
input_number:
awning_position:
name: Posicao estore suite
icon: mdi:map-marker-distance
initial: 0
min: 0
max: 100
step: 10
All that should happen is when you click on the slider line the cover will move to that position. The indicator doesnāt move with the cover, just in case thatās what you were expecting.
mclaudiopt
(Mclaudiopt)
April 22, 2019, 10:54am
115
Hi
what happens is this:
Image from the slider
image from built in code:
so it seams that they are not synced
since i am not at home now i dont know if the roller is really moving or not but i think not
- alias: 'Set awning position'
initial_state: 'on'
trigger:
- platform: state
entity_id: input_number.awning_position
action:
# - delay: '00:00:3'
- service: mqtt.publish
data_template:
topic: 'shellies/shellyswitch-559C7E/roller/0/command/pos'
retain: true
payload: "{{ states('input_number.awning_position') | int }}"
config:
input_number:
awning_position:
name: Posicao estore suite
icon: mdi:map-marker-distance
initial: 0
min: 0
max: 100
step: 10
#Estore slider
posicao_estore_suite:
name: Posicao estore suite
icon: mdi:map-marker-distance
initial: 0
min: 0
max: 100
step: 10
the entity i am adding is this one:
input_number.awning_position
ashscott
(Ash)
April 22, 2019, 11:06am
116
Iām not sure what you are trying to achieve but if you add a sensor you will be able to see what position the awning is.
sensor:
- platform: mqtt
name: "Awning Position"
state_topic: "shellies/shellyswitch-Ā£Ā£Ā£Ā£Ā£Ā£/roller/0/pos"
unit_of_measurement: "%"
icon: mdi:percent
mclaudiopt
(Mclaudiopt)
April 22, 2019, 11:12am
117
ok will try this night and give feedback !
mclaudiopt
(Mclaudiopt)
April 22, 2019, 11:36am
118
hi againā¦
i am so sorry for beeing a noob . you are helping a lot
so with the sensor i got the following:
but this is the result of changing this slider:
and not this one
that apparently is not getting the info to send to shelly
current code:
config:
input_number:
awning_position:
name: Posicao estore suite
icon: mdi:map-marker-distance
initial: 0
min: 0
max: 100
step: 10
#Estore slider
posicao_estore_suite:
name: Posicao estore suite
icon: mdi:map-marker-distance
initial: 0
min: 0
max: 100
step: 10
automation yaml:
- alias: 'Set awning position'
initial_state: 'on'
trigger:
- platform: state
entity_id: input_number.awning_position
action:
# - delay: '00:00:3'
- service: mqtt.publish
data_template:
topic: 'shellies/shellyswitch-559C7E/roller/0/command/pos'
retain: true
payload: "{{ states('input_number.awning_position') | int }}"
ashscott
(Ash)
April 22, 2019, 11:38am
119
input_number is still indented incorrectly. Move it left.
mclaudiopt
(Mclaudiopt)
April 22, 2019, 11:52am
122
done but it does not workā¦
apparently the slider does not send info i thinkā¦
the sensor gives the correct info about the state but the slider, no matter where i move it does not impact the sensor
ashscott
(Ash)
April 22, 2019, 12:05pm
123
The sensor is getting itās information from the Shelly so the Shelly must be responding to the slider.