附一份ha中的ui代码,如果没改固件中的名称,直接可用。 
 
type: vertical-stack
cards:
  - type: button
    tap_action:
      action: toggle
    hold_action:
      action: more-info
    show_icon: true
    show_name: true
    entity: switch.muyu
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: call-service
          service: switch.turn_on
          service_data:
            entity_id:
              - switch.qunuan1
        hold_action:
          action: more-info
        show_icon: true
        show_name: true
        entity: binary_sensor.qunuan1
      - type: button
        tap_action:
          action: call-service
          service: switch.turn_on
          service_data:
            entity_id:
              - switch.qunuan2
        hold_action:
          action: more-info
        show_icon: true
        show_name: true
        entity: binary_sensor.qunuan2
      - type: button
        tap_action:
          action: call-service
          service: switch.turn_on
          service_data:
            entity_id:
              - switch.chuifeng
        hold_action:
          action: more-info
        show_icon: true
        show_name: true
        entity: binary_sensor.chuifeng
      - type: button
        tap_action:
          action: call-service
          service: switch.turn_on
          service_data:
            entity_id:
              - switch.huanqi
        hold_action:
          action: more-info
        show_icon: true
        show_name: true
        entity: binary_sensor.huanqi
      - type: button
        tap_action:
          action: call-service
          service: switch.turn_on
          service_data:
            entity_id:
              - switch.heater_light
        hold_action:
          action: more-info
        show_icon: true
        show_name: true
        entity: binary_sensor.heater_light 
  
效果长这样
 
 
 |