With MQTT and Shelly 2 I can use this status and this command for positioning:
* `shellies/shellyswitch-<deviceid>/roller/0/pos` reports the current positionin percent
* `shellies/shellyswitch-<deviceid>/roller/0/command/pos` accepts a number between 0 and 100, which is target position in percent.
Do I need to modify anything in the cover template according to this?
It is enough to get the cover work. If you like to know if the device is available or not you have to add three more properties to the definition (see my post above).
You will see the slider, after clicking on the device in the web interface. You do not need an additional input_number to do this.
This is an automation example I’m using:
- alias: 'Close most slats when the sun gets dim'
id: 'cmswtsgd'
trigger:
platform: sun
event: sunset
offset: '-00:45:00'
action:
service: cover.set_cover_position
entity_id: cover.bedroom_cover
data:
position: 14
I was modifying the file cover.yaml, while in configuration.yaml was not referenced, but there was an old definition of the cover without the percentage.
I’ve been watching this thread for a while and finally got around to updating the firmware on my Shelly. All works fine from the Shelly web server with regard to positioning but I don’t see the slider in HA.
I copied your definition, overwriting my original, and just changed the name and Shelly number. Still no slider.
After HA restart, the Shelly was unavailable to HA. Rebooting the Shelly had the Up, Stop and Down icons appear, with the Down greyed out (which is new and useful). But still no slider.
I’m not sure where to go from here to get the slider to show up.
As @Florian said some posts before, you will see the slider after clicking on the device in the web interface.
So click on the Garage door and you will see the slider.
I also suggest you to add this
value_template: '{{ value.x }}'
at the end of the configuration, so you won’t have the fact that one of the button (Up/Stop/Down) will be grayed out.
I’m trying to have the cover position slider show up in a group rather than having to click the entity.
It passes config check but instead of publishing the input_number position to the Shelly it publishes “{{ states(‘input_number.awning_position’) | int }}”, the value template itself.
Is the following possible? if I only want the minimum of the cover to go to 10% and maximum to 90%, how would I configure this? Eg. if the slider is completely to the left, cover goes to 10% (not 0%) and if the slider is completely to the right the cover goes to 90% (not 100%).
Hi @woody4165
I also installed the shelly 2, I put the configuration code in the config.yaml file and everything works.
But I was looking at the next piece of code you wrote and I do not understand what it’s for. Also and where do you have to write it? in the File config.yaml?