Open elronzo opened 5 months ago
I struggle a bit with getting this to work.
shortcuts:
- name: Stue
icon: mdi:sofa
service: xiaomi_miio.vacuum_clean_segment
service_data:
target:
device_id: 553a536e86e5b116d6d6f
data:
segments: 20
When clicking the icon, I get:
Failed to call service xiaomi_miio/vacuum_clean_segment. extra keys not allowed @ data['target']
Any idea?
'data:' before 'segements:' is superfluous.
'data:' before 'segements:' is superfluous.
Tried removing it, but it still throws the same error. I’ve tried all kinds of variants and believe I’m really close, but can’t seem to get it just right…
service_data:
target:
device_id: 553a536e86e5b116d6d6f
segments: 20
And
service_data:
target:
device_id: 553a536e86e5b116d6d6f
segments: 20
Your config needs to either look exactly as provided here: https://github.com/denysdovhan/vacuum-card/ (= You need to create a script in HA that makes the MQTT call) or use my variant (= do mqtt.publish directly). But not a mix of both.
I’m not trying to do a mqtt.publish, but to call a different service (“service: xiaomi_miio.vacuum_clean_segment”).
Since the mqtt.push-service can be called directly, I expect all kinds of service calls can be called directly?
Valetudo uses MQTT. So you'll definitely need the MQTT part somewhere.
Valetudo uses MQTT. So you'll definitely need the MQTT part somewhere.
I don’t use Valetudo, I use the Xiaomi Miio integration.
The same code works fine when used in an automation. It’s when copying it from an automation and to the shortcut-section of this cards it fails.
There hasn't been any activity on this issue recently. This issue has now been marked as stale and will be closed if no further activity occurs. Please, update to the latest version and check if that solves the issue. Thank you for your contributions!
I'm a first timer too and I have NO idea how to setup the scripts.. Its on the card like "script.clean_living_room" but I have no idea where do i define what cleaning area, where do i write the script and how.. Readme just says "You can defined custom scripts for custom actions i.e cleaning specific room" which doesnt help me at all. Neither does the HA official document. Complete noob here
There hasn't been any activity on this issue recently. This issue has now been marked as stale and will be closed if no further activity occurs. Please, update to the latest version and check if that solves the issue. Thank you for your contributions!
One does not necessarily need a script. A direct service call is possible: