I’ll echo that documentation would be very nice for creating custom device types.
In the meantime, I’m working on this project. I am trying to control an external LED strip and have a tile for the strip that cycles through these states: dark, red, green, blue, and white. I came up with this code:
standardTile("ledstrip", "device.ledstrip") {
state "dark", label: '${name}', action: "ledstrip.red", icon: "st.Lighting.light13", backgroundColor: "#000000"
state "red", label: '${name}', action: "ledstrip.green", icon: "st.Lighting.light13", backgroundColor: "#ff0000"
state "green", label: '${name}', action: "ledstrip.blue", icon: "st.Lighting.light13", backgroundColor: "#00ff00"
state "blue", label: '${name}', action: "ledstrip.white", icon: "st.Lighting.light13", backgroundColor: "#0000ff"
state "white", label: '${name}', action: "ledstrip.dark", icon: "st.Lighting.light13", backgroundColor: "#ffffff"
}
In this code, the states successfully cycle in the app, but don’t pass the desired commands on to the shield (commands are dark, red, green, blue, and white).
I tried this version, and the commands are passed but the states don’t change.
standardTile("ledstrip", "device.ledstrip") {
state "dark", label: '${name}', action: "red", icon: "st.Lighting.light13", backgroundColor: "#000000"
state "red", label: '${name}', action: "green", icon: "st.Lighting.light13", backgroundColor: "#ff0000"
state "green", label: '${name}', action: "blue", icon: "st.Lighting.light13", backgroundColor: "#00ff00"
state "blue", label: '${name}', action: "white", icon: "st.Lighting.light13", backgroundColor: "#0000ff"
state "white", label: '${name}', action: "dark", icon: "st.Lighting.light13", backgroundColor: "#ffffff"
}
I’m not quite sure how to get it working. Anyone have any insight?