投影邮递员 发表于 2024-1-11 11:27

极米投影按键api控制插件分享

前面给大家分享了极米投影仪的相关api分享 实现远程控制开机,下面再来给大家分享一下极米投影按键api控制插件,有需要的朋友自取。

前只做了简单按键的api,感觉够用了,以后不够用再试试复杂的,把下面附件解压到你的custom_components目录下(压缩包放在文末)


在configuration.yaml文件中加入:

remote:
- platform: xgimi_remote
    name: liveroom
    host: 192.168.99.157(改为你自己的IP)

lovelace 控制面板


cards:
- cards:
      - color: 'rgb(255, 100, 100)'
      entity: remote.liveroom_xgimitv_power
      icon: 'mdi:power'
      show_name: false
      style:
          - height: 50px
      type: 'custom:button-card'
      - color_type: blank-card
      type: 'custom:button-card'
      - color_type: blank-card
      type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
      entity: remote.liveroom_xgimitv_up
      icon: 'mdi:menu-up'
      show_name: false
      style:
          - height: 50px
      type: 'custom:button-card'
      - color_type: blank-card
      type: 'custom:button-card'
      - color_type: blank-card
      type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
      show_name: false
      entity: remote.liveroom_xgimitv_home
      icon: 'mdi:home'
      style:
          - height: 50px
      type: 'custom:button-card'
    type: horizontal-stack
- cards:
      - color: 'rgb(255, 100, 100)'
      show_name: false
      entity: remote.liveroom_xgimitv_setup
      icon: 'mdi:settings'
      style:
          - height: 50px
      type: 'custom:button-card'
      - color_type: blank-card
      type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
      entity: remote.liveroom_xgimitv_left
      icon: 'mdi:menu-left'
      show_name: false
      style:
          - height: 50px
      type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
      color_type: card
      entity: remote.liveroom_xgimitv_play
      icon: 'mdi:play-pause'
      name: OK
      show_icon: false
      style:
          - height: 50px
      type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
      entity: remote.liveroom_xgimitv_right
      icon: 'mdi:menu-right'
      show_name: false
      style:
          - height: 50px
      type: 'custom:button-card'
      - color_type: blank-card
      type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
      show_name: false
      entity: remote.liveroom_xgimitv_menu
      icon: 'mdi:menu'
      style:
          - height: 50px
      type: 'custom:button-card'
    type: horizontal-stack
- cards:
      - color: 'rgb(255, 100, 100)'
      entity: remote.liveroom_xgimitv_back
      show_name: false
      icon: 'mdi:keyboard-backspace'
      style:
          - height: 50px
      type: 'custom:button-card'
      - color_type: blank-card
      type: 'custom:button-card'
      - color_type: blank-card
      type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
      entity: remote.liveroom_xgimitv_down
      icon: 'mdi:menu-down'
      show_name: false
      style:
          - height: 50px
      type: 'custom:button-card'
      - color_type: blank-card
      type: 'custom:button-card'
      - color_type: blank-card
      type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
      show_name: false
      entity: remote.liveroom_xgimitv_volumemute
      icon: 'mdi:volume-mute'
      style:
          - height: 50px
      type: 'custom:button-card'
    type: horizontal-stack
- cards:
      - color_type: blank-card
      type: 'custom:button-card'
      - color_type: blank-card
      type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
      color_type: card
      show_name: false
      icon: 'mdi:volume-plus'
      style:
          - height: 30px
      entity: remote.liveroom_xgimitv_volumeup
      type: 'custom:button-card'
      - color_type: blank-card
      type: 'custom:button-card'
      - color: 'rgb(255, 100, 100)'
      show_name: false
      color_type: card
      entity: remote.liveroom_xgimitv_volumedown
      icon: 'mdi:volume-minus'
      style:
          - height: 30px
      type: 'custom:button-card'
      - color_type: blank-card
      type: 'custom:button-card'
      - color_type: blank-card
      type: 'custom:button-card'
    type: horizontal-stack
type: vertical-stack

**** Hidden Message *****

原作者:linlingzi

https://www.znds.com/static/image/hrline/4.gif

相关阅读推荐:
极米new Z6X接入米家教程 实现小爱控制蓝牙开机及Wifi关机

sunwukong1 发表于 2024-1-11 13:03

学习一下。准备搞一搞。

yan5277544 发表于 2024-3-6 13:41

感谢分享~

tianshiemoDX 发表于 2024-3-15 11:41

谢谢

wangjie9699 发表于 2024-10-8 20:45

学习下api技术

w521522 发表于 2024-10-22 20:22

好的很

wwoldok 发表于 2024-10-24 14:20


学习一下
页: [1]
查看完整版本: 极米投影按键api控制插件分享