romedtino / simple-wyze-vac

Home Assistant Custom Component for Wyze Vacuum
49 stars 8 forks source link

Question: Custom Actions for Simple Vacuum Card #10

Closed danielzrob closed 2 years ago

danielzrob commented 2 years ago

Has anyone else had issues adding the custom actions to the little toolbar in the custom card?

There is no reported bugs for it on Vacuum_Card and I just wanted to see if anyone using the wyze implementation was having issues.

Love this integration btw thank you!

romedtino commented 2 years ago

Oh they changed the way you write custom actions not too long ago. Mine looks like this now for example

type: custom:vacuum-card
entity: vacuum.theovac
image: default
show_toolbar: true
show_status: true
show_name: true
compact_view: false
shortcuts:
  - name: Clean living room
    service: script.vacuum_room_clean
    icon: mdi:sofa
    service_data:
      rooms:
        - Living Room
  - name: Update
    service: script.vacuum_update_state
    icon: mdi:update
view_layout:
  position: sidebar
danielzrob commented 2 years ago

Thanks! I'm still pretty new to home assistant and am still learning, I had assumed I was just doing something wrong :D

Also I run a script polling the state every 30 seconds when not in docked state, keeps the card up to date without having to mess with the refresh button !