『瀚思彼岸』» 智能家居技术论坛

标题: esphome灯带RGB单独灯珠发光发生错误 [打印本页]

作者: zy302688381    时间: 2022-11-10 19:13
标题: esphome灯带RGB单独灯珠发光发生错误
本帖最后由 zy302688381 于 2022-11-11 14:23 编辑

求助各位大神esphome灯带RGB单独灯珠发光发生错误
官方代码地址信息条纹 — ESPHome
[attach]43139[/attach]

我的代码如下:
esphome:
  name: jc-shui-wei-baojing

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: "1"
ota:
  password: "1"

wifi:
  ssid: "99123"     ## wifi账号;
  password: ""  ## wifi密码;
  manual_ip:                              #需要对nodemcu设定固定的ip地址
    static_ip: 172.16.2.84              #ip地址   
    gateway: 172.16.0.1                  #网关
    subnet: 255.255.0.0
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Jc-Shui-Wei-Baojing"
    password: "12345678"
web_server:  ## web控制,添加了这2行,就可以在网页端打开设备ip;
  port: 80
  auth:
    username: "admin"
    password: "12345678"

captive_portal:


light:
  - platform: fastled_clockless
    chipset: WS2811
    pin: GPIO2
    id: light_fastled
    num_leds: 9
    rgb_order: GRB
    name: "Infostrip"
    effects:
      - strobe:
      - random:
  - platform: partition
    name: "PL0"
    segments:
      - id: light_fastled
          from: 0
          to: 0
    effects:
      - strobe:

  - platform: partition
    name: "PL1"
    segments:
      - id: light_fastled
          from: 1
          to: 1
    effects:
      - strobe:

  - platform: partition
    name: "PL2"
    segments:
      - id: light_fastled
          from: 2
          to: 2
    effects:
      - strobe:

  - platform: partition
    name: "PL3"
    segments:
      - id: light_fastled
          from: 3
          to: 3
    effects:
      - strobe:

  - platform: partition
    name: "PL4"
    segments:
      - id: light_fastled
          from: 4
          to: 4
    effects:
      - strobe:

  - platform: partition
    name: "PL5"
    segments:
      - id: light_fastled
          from: 5
          to: 5
    effects:
      - strobe:

  - platform: partition
    name: "PL6"
    segments:
      - id: light_fastled
          from: 6
          to: 6
    effects:
      - strobe:

  - platform: partition
    name: "PL7"
    segments:
      - id: light_fastled
          from: 7
          to: 7
    effects:
      - strobe:

  - platform: partition
    name: "PL8"
    segments:
      - id: light_fastled
          from: 8
          to: 8
    effects:
      - strobe:

  - platform: partition
    name: "PL8"
    segments:
      - id: light_fastled
          from: 8
          to: 8
    effects:
      - strobe:


作者: biox998    时间: 2022-11-10 20:38
是不是格式错误了?是不是from前面去掉两个空格
作者: relliky    时间: 2022-11-11 03:14
楼上正解,from,id,to空格要对齐
作者: zy302688381    时间: 2022-11-11 14:18
biox998 发表于 2022-11-10 20:38
是不是格式错误了?是不是from前面去掉两个空格

谢谢哥!帮大忙了,我还以为不同行的




欢迎光临 『瀚思彼岸』» 智能家居技术论坛 (https://bbs.hassbian.com/) Powered by Discuz! X3.5