Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing states/attributes from Zigbee devices that are available in Hubitat but show up as "Unknown" in Home Assistant #231

Open
ajtatum opened this issue Dec 27, 2023 · 13 comments

Comments

@ajtatum
Copy link

ajtatum commented Dec 27, 2023

I have numerous devices, most of which were connected directly to HA via a Sonoff USB dongle, that used to have more attributes and those attributes (and more) show up in Hubitat, but they come over to Home Assistant as "Disabled" at first, but after enabling them those states/attributes just show up as Unknown.

The common attributes among states that don't show up across any type of device that emits a light (either a bulb, a motion sensor night light, etc), is the devices "Color" and "RGB" state.

For example, I have ~10 Sengled ZigBee light bulbs and in Hubitat I can see:

colorMode : CT
colorName : Moonlight
colorTemperature : 3521
level : 90
switch : on

In Home Assistant, I can turn on/off the light and change the color. However, for Color and RGB, it shows as "Unkown.".

It would be helpful to be able to have the Color and RGB info as I base some automations on the current color of the light.

Also, battery information doesn't come across from Hubitat when using the Battery Information add-on.

I've attached a debug from HA, but removed all lines that didn't contain hubitat. Let me know if more is needed.

ha_hubitat.txt

@jason0x43
Copy link
Owner

Historically the integration has mostly dealt with HSL and CT, because that had the widest support in Hubitat when the integration was created, but it shouldn't be too difficult to add support for the RGB and color attributes.

Could you post the capabilities of one of the light devices here so I can see what those properties look like?

@ajtatum
Copy link
Author

ajtatum commented Jan 5, 2024

Sorry for the late response, here are a couple examples. Based on playing around with it more, there seems to be some "loss in translation" when setting the color in HA and how that value gets stored in Hubitat. I could be wrong, but it seems like Hubitat ends up storing the color name and not a RGB, etc code. However, Home Assistant isn't able to read back the color name property from Hubitat so it displays as "Unknown".

These don't report any color information from Hubitat

{
  "id": "4",
  "name": "Sengled Element Plus",
  "label": "AJ's Lamp",
  "type": "Sengled Element Color Plus",
  "room": "Vincent's Bedroom",
  "attributes": [
    {
      "name": "hue",
      "currentValue": null,
      "dataType": "NUMBER"
    },
    {
      "name": "colorName",
      "currentValue": "Moonlight",
      "dataType": "STRING"
    },
    {
      "name": "switch",
      "currentValue": "on",
      "dataType": "ENUM",
      "values": [
        "on",
        "off"
      ]
    },
    {
      "name": "colorName",
      "currentValue": "Moonlight",
      "dataType": "STRING"
    },
    {
      "name": "level",
      "currentValue": 50,
      "dataType": "NUMBER"
    },
    {
      "name": "colorTemperature",
      "currentValue": 3521,
      "dataType": "NUMBER"
    },
    {
      "name": "colorMode",
      "currentValue": "CT",
      "dataType": "ENUM",
      "values": [
        "CT",
        "RGB"
      ]
    },
    {
      "name": "saturation",
      "currentValue": null,
      "dataType": "NUMBER"
    },
    {
      "name": "color",
      "currentValue": null,
      "dataType": "STRING"
    },
    {
      "name": "RGB",
      "currentValue": null,
      "dataType": "STRING"
    },
    {
      "name": "switch",
      "currentValue": "on",
      "dataType": "ENUM",
      "values": [
        "on",
        "off"
      ]
    }
  ],
  "capabilities": [
    "Configuration",
    "Actuator",
    "ColorTemperature",
    {
      "attributes": [
        {
          "name": "colorTemperature",
          "dataType": null
        },
        {
          "name": "colorName",
          "dataType": null
        }
      ]
    },
    "ColorMode",
    {
      "attributes": [
        {
          "name": "colorMode",
          "dataType": null
        }
      ]
    },
    "ColorControl",
    {
      "attributes": [
        {
          "name": "hue",
          "dataType": null
        },
        {
          "name": "saturation",
          "dataType": null
        },
        {
          "name": "color",
          "dataType": null
        },
        {
          "name": "colorName",
          "dataType": null
        },
        {
          "name": "RGB",
          "dataType": null
        }
      ]
    },
    "ChangeLevel",
    "SwitchLevel",
    {
      "attributes": [
        {
          "name": "level",
          "dataType": null
        }
      ]
    },
    "Light",
    {
      "attributes": [
        {
          "name": "switch",
          "dataType": null
        }
      ]
    },
    "Switch",
    {
      "attributes": [
        {
          "name": "switch",
          "dataType": null
        }
      ]
    }
  ],
  "commands": [
    "configure",
    "off",
    "on",
    "refresh",
    "setColor",
    "setColorTemperature",
    "setHue",
    "setLevel",
    "setSaturation",
    "startLevelChange",
    "stopLevelChange",
    "updateFirmware"
  ]
}
{
  "id": "20",
  "name": "Sengled Element Color Plus",
  "label": "Living Room Lamp",
  "type": "Sengled Element Color Plus",
  "room": "Living Room",
  "attributes": [
    {
      "name": "hue",
      "currentValue": null,
      "dataType": "NUMBER"
    },
    {
      "name": "colorName",
      "currentValue": "Incandescent",
      "dataType": "STRING"
    },
    {
      "name": "switch",
      "currentValue": "off",
      "dataType": "ENUM",
      "values": [
        "on",
        "off"
      ]
    },
    {
      "name": "colorName",
      "currentValue": "Incandescent",
      "dataType": "STRING"
    },
    {
      "name": "level",
      "currentValue": 1,
      "dataType": "NUMBER"
    },
    {
      "name": "colorTemperature",
      "currentValue": 2703,
      "dataType": "NUMBER"
    },
    {
      "name": "colorMode",
      "currentValue": "CT",
      "dataType": "ENUM",
      "values": [
        "CT",
        "RGB"
      ]
    },
    {
      "name": "saturation",
      "currentValue": 100,
      "dataType": "NUMBER"
    },
    {
      "name": "color",
      "currentValue": null,
      "dataType": "STRING"
    },
    {
      "name": "RGB",
      "currentValue": null,
      "dataType": "STRING"
    },
    {
      "name": "switch",
      "currentValue": "off",
      "dataType": "ENUM",
      "values": [
        "on",
        "off"
      ]
    }
  ],
  "capabilities": [
    "Configuration",
    "Actuator",
    "ColorTemperature",
    {
      "attributes": [
        {
          "name": "colorTemperature",
          "dataType": null
        },
        {
          "name": "colorName",
          "dataType": null
        }
      ]
    },
    "ColorMode",
    {
      "attributes": [
        {
          "name": "colorMode",
          "dataType": null
        }
      ]
    },
    "ColorControl",
    {
      "attributes": [
        {
          "name": "hue",
          "dataType": null
        },
        {
          "name": "saturation",
          "dataType": null
        },
        {
          "name": "color",
          "dataType": null
        },
        {
          "name": "colorName",
          "dataType": null
        },
        {
          "name": "RGB",
          "dataType": null
        }
      ]
    },
    "ChangeLevel",
    "SwitchLevel",
    {
      "attributes": [
        {
          "name": "level",
          "dataType": null
        }
      ]
    },
    "Light",
    {
      "attributes": [
        {
          "name": "switch",
          "dataType": null
        }
      ]
    },
    "Switch",
    {
      "attributes": [
        {
          "name": "switch",
          "dataType": null
        }
      ]
    }
  ],
  "commands": [
    "configure",
    "off",
    "on",
    "refresh",
    "setColor",
    "setColorTemperature",
    "setHue",
    "setLevel",
    "setSaturation",
    "startLevelChange",
    "stopLevelChange",
    "updateFirmware"
  ]
}
{
  "id": "8",
  "name": "Advanced Zigbee RGBW Bulb",
  "label": "Under Bed Light Strip",
  "type": "Advanced Zigbee RGBW Bulb",
  "room": "Vincent's Bedroom",
  "attributes": [
    {
      "name": "colorMode",
      "currentValue": "CT",
      "dataType": "ENUM",
      "values": [
        "CT",
        "RGB"
      ]
    },
    {
      "name": "level",
      "currentValue": 50,
      "dataType": "NUMBER"
    },
    {
      "name": "switch",
      "currentValue": "off",
      "dataType": "ENUM",
      "values": [
        "on",
        "off"
      ]
    },
    {
      "name": "RGB",
      "currentValue": null,
      "dataType": "STRING"
    },
    {
      "name": "colorTemperature",
      "currentValue": 6451,
      "dataType": "NUMBER"
    },
    {
      "name": "color",
      "currentValue": null,
      "dataType": "STRING"
    },
    {
      "name": "colorName",
      "currentValue": "Skylight",
      "dataType": "STRING"
    },
    {
      "name": "switch",
      "currentValue": "off",
      "dataType": "ENUM",
      "values": [
        "on",
        "off"
      ]
    },
    {
      "name": "hue",
      "currentValue": null,
      "dataType": "NUMBER"
    },
    {
      "name": "switch",
      "currentValue": "off",
      "dataType": "ENUM",
      "values": [
        "on",
        "off"
      ]
    },
    {
      "name": "colorName",
      "currentValue": "Skylight",
      "dataType": "STRING"
    },
    {
      "name": "saturation",
      "currentValue": null,
      "dataType": "NUMBER"
    }
  ],
  "capabilities": [
    "Configuration",
    "Actuator",
    "Bulb",
    {
      "attributes": [
        {
          "name": "switch",
          "dataType": null
        }
      ]
    },
    "ColorTemperature",
    {
      "attributes": [
        {
          "name": "colorTemperature",
          "dataType": null
        },
        {
          "name": "colorName",
          "dataType": null
        }
      ]
    },
    "ColorMode",
    {
      "attributes": [
        {
          "name": "colorMode",
          "dataType": null
        }
      ]
    },
    "ColorControl",
    {
      "attributes": [
        {
          "name": "hue",
          "dataType": null
        },
        {
          "name": "saturation",
          "dataType": null
        },
        {
          "name": "color",
          "dataType": null
        },
        {
          "name": "colorName",
          "dataType": null
        },
        {
          "name": "RGB",
          "dataType": null
        }
      ]
    },
    "ChangeLevel",
    "SwitchLevel",
    {
      "attributes": [
        {
          "name": "level",
          "dataType": null
        }
      ]
    },
    "Light",
    {
      "attributes": [
        {
          "name": "switch",
          "dataType": null
        }
      ]
    },
    "Switch",
    {
      "attributes": [
        {
          "name": "switch",
          "dataType": null
        }
      ]
    }
  ],
  "commands": [
    "configure",
    "flash",
    "off",
    "on",
    "presetLevel",
    "setColor",
    "setColorTemperature",
    "setHue",
    "setLevel",
    "setSaturation",
    "startLevelChange",
    "stopLevelChange",
    "updateFirmware"
  ]
}

This one shows up with color and RGB as unknown. Color in Hubitat is set to Blue. Color was set in Home Assistant via Automation.

{
  "id": "27",
  "name": "Third Reality Multi-Function Night Light",
  "label": "Bathroom Occupancy Multi-Function Sensor",
  "type": "Third Reality Multi-Function Night Light",
  "room": "Laundry Room",
  "attributes": [
    {
      "name": "saturation",
      "currentValue": 100,
      "dataType": "NUMBER"
    },
    {
      "name": "RGB",
      "currentValue": null,
      "dataType": "STRING"
    },
    {
      "name": "motion",
      "currentValue": "inactive",
      "dataType": "ENUM",
      "values": [
        "inactive",
        "active"
      ]
    },
    {
      "name": "hue",
      "currentValue": 4,
      "dataType": "NUMBER"
    },
    {
      "name": "colorName",
      "currentValue": "Orange",
      "dataType": "STRING"
    },
    {
      "name": "switch",
      "currentValue": "on",
      "dataType": "ENUM",
      "values": [
        "on",
        "off"
      ]
    },
    {
      "name": "illuminance",
      "currentValue": 1,
      "dataType": "NUMBER"
    },
    {
      "name": "switch",
      "currentValue": "on",
      "dataType": "ENUM",
      "values": [
        "on",
        "off"
      ]
    },
    {
      "name": "level",
      "currentValue": 10,
      "dataType": "NUMBER"
    },
    {
      "name": "color",
      "currentValue": null,
      "dataType": "STRING"
    },
    {
      "name": "switch",
      "currentValue": "on",
      "dataType": "ENUM",
      "values": [
        "on",
        "off"
      ]
    }
  ],
  "capabilities": [
    "MotionSensor",
    {
      "attributes": [
        {
          "name": "motion",
          "dataType": null
        }
      ]
    },
    "Configuration",
    "Actuator",
    "Bulb",
    {
      "attributes": [
        {
          "name": "switch",
          "dataType": null
        }
      ]
    },
    "IlluminanceMeasurement",
    {
      "attributes": [
        {
          "name": "illuminance",
          "dataType": null
        }
      ]
    },
    "ColorControl",
    {
      "attributes": [
        {
          "name": "hue",
          "dataType": null
        },
        {
          "name": "saturation",
          "dataType": null
        },
        {
          "name": "color",
          "dataType": null
        },
        {
          "name": "colorName",
          "dataType": null
        },
        {
          "name": "RGB",
          "dataType": null
        }
      ]
    },
    "ChangeLevel",
    "SwitchLevel",
    {
      "attributes": [
        {
          "name": "level",
          "dataType": null
        }
      ]
    },
    "Light",
    {
      "attributes": [
        {
          "name": "switch",
          "dataType": null
        }
      ]
    },
    "Switch",
    {
      "attributes": [
        {
          "name": "switch",
          "dataType": null
        }
      ]
    }
  ],
  "commands": [
    "configure",
    "flash",
    "off",
    "on",
    "setColor",
    "setHue",
    "setLevel",
    "setSaturation",
    "startLevelChange",
    "stopLevelChange",
    "updateFirmware"
  ]
}

@jason0x43
Copy link
Owner

Still looking into this...

@jason0x43
Copy link
Owner

Light and sensor entities have undergone quite a few updates over the last couple of months, including some fixes that specifically addressed attributes not updating. Is this issue still occurring?

@brpeterso
Copy link

brpeterso commented May 4, 2024

It looks like you are still waiting on a response to this. I just checked some Sengled RGB bulbs that I added to Hubitat recently and they show up as "Unknown" in Home Assistant for the Color and Rgb attributes. I'm on version 0.9.28. Screenshot for reference.
image

@ajtatum
Copy link
Author

ajtatum commented May 15, 2024

Light and sensor entities have undergone quite a few updates over the last couple of months, including some fixes that specifically addressed attributes not updating. Is this issue still occurring?

Yes, the lights still show unknown for color and RGB.

@ajtatum
Copy link
Author

ajtatum commented Jul 1, 2024

Sorry for not following up, but I just wanted to do a conditional automation depending on the light color of a pair of Philips Hue White and Color Ambiance lights and it has the sensors "Color" and "RGB" but unfortunately they show up as "Unknown". In Hubitat, the "colorName" state shows "Warm White". Here's the full response from the API:

{
    "id": "73",
    "name": "Philips Hue White and Color Ambiance",
    "label": "Laundry Room Light 02",
    "type": "Philips Hue White and Color Ambiance",
    "room": "Laundry Room",
    "attributes": [
        {
            "name": "colorName",
            "currentValue": "Warm White",
            "dataType": "STRING"
        },
        {
            "name": "saturation",
            "currentValue": 25,
            "dataType": "NUMBER"
        },
        {
            "name": "levelPreset",
            "currentValue": null,
            "dataType": "NUMBER"
        },
        {
            "name": "switch",
            "currentValue": "on",
            "dataType": "ENUM",
            "values": [
                "on",
                "off"
            ]
        },
        {
            "name": "colorMode",
            "currentValue": "CT",
            "dataType": "ENUM",
            "values": [
                "CT",
                "RGB"
            ]
        },
        {
            "name": "effectName",
            "currentValue": "none",
            "dataType": "STRING"
        },
        {
            "name": "switch",
            "currentValue": "on",
            "dataType": "ENUM",
            "values": [
                "on",
                "off"
            ]
        },
        {
            "name": "checkInterval",
            "currentValue": null,
            "dataType": "NUMBER"
        },
        {
            "name": "hue",
            "currentValue": 14,
            "dataType": "NUMBER"
        },
        {
            "name": "RGB",
            "currentValue": null,
            "dataType": "STRING"
        },
        {
            "name": "color",
            "currentValue": null,
            "dataType": "STRING"
        },
        {
            "name": "switch",
            "currentValue": "on",
            "dataType": "ENUM",
            "values": [
                "on",
                "off"
            ]
        },
        {
            "name": "level",
            "currentValue": 100,
            "dataType": "NUMBER"
        },
        {
            "name": "colorTemperature",
            "currentValue": 3401,
            "dataType": "NUMBER"
        },
        {
            "name": "lightEffects",
            "currentValue": "[\"candle\",\"fireplace\",\"color loop\"]",
            "dataType": "JSON_OBJECT"
        },
        {
            "name": "colorName",
            "currentValue": "Warm White",
            "dataType": "STRING"
        },
        {
            "name": "healthStatus",
            "currentValue": "online",
            "dataType": "ENUM",
            "values": [
                "unknown",
                "offline",
                "online"
            ]
        },
        {
            "name": "effectName",
            "currentValue": "none",
            "dataType": "STRING"
        }
    ],
    "capabilities": [
        "Flash",
        "Bulb",
        {
            "attributes": [
                {
                    "name": "switch",
                    "dataType": null
                }
            ]
        },
        "Refresh",
        "ColorTemperature",
        {
            "attributes": [
                {
                    "name": "colorTemperature",
                    "dataType": null
                },
                {
                    "name": "colorName",
                    "dataType": null
                }
            ]
        },
        "ColorMode",
        {
            "attributes": [
                {
                    "name": "colorMode",
                    "dataType": null
                }
            ]
        },
        "Light",
        {
            "attributes": [
                {
                    "name": "switch",
                    "dataType": null
                }
            ]
        },
        "Switch",
        {
            "attributes": [
                {
                    "name": "switch",
                    "dataType": null
                }
            ]
        },
        "HealthCheck",
        {
            "attributes": [
                {
                    "name": "checkInterval",
                    "dataType": null
                }
            ]
        },
        "Configuration",
        "Actuator",
        "ColorControl",
        {
            "attributes": [
                {
                    "name": "hue",
                    "dataType": null
                },
                {
                    "name": "saturation",
                    "dataType": null
                },
                {
                    "name": "color",
                    "dataType": null
                },
                {
                    "name": "colorName",
                    "dataType": null
                },
                {
                    "name": "RGB",
                    "dataType": null
                }
            ]
        },
        "LevelPreset",
        {
            "attributes": [
                {
                    "name": "levelPreset",
                    "dataType": null
                }
            ]
        },
        "ChangeLevel",
        "LightEffects",
        {
            "attributes": [
                {
                    "name": "lightEffects",
                    "dataType": null
                },
                {
                    "name": "effectName",
                    "dataType": null
                }
            ]
        },
        "SwitchLevel",
        {
            "attributes": [
                {
                    "name": "level",
                    "dataType": null
                }
            ]
        }
    ],
    "commands": [
        "bindInitiator",
        "configure",
        "flash",
        "identify",
        "off",
        "on",
        "ping",
        "presetLevel",
        "refresh",
        "setColor",
        "setColorTemperature",
        "setColorXy",
        "setEffect",
        "setEnhancedHue",
        "setHue",
        "setLevel",
        "setNextEffect",
        "setPreviousEffect",
        "setSaturation",
        "setScene",
        "startLevelChange",
        "stepColorTemperature",
        "stepHueChange",
        "stepLevelChange",
        "stopLevelChange",
        "toggle"
    ]
}

@ajtatum
Copy link
Author

ajtatum commented Jul 1, 2024

This is the response when the light is a color if it makes a difference. It does seem that this may be on the Hubitat side as "RGB" and "color" are still null, but just has a "colorName":

{
    "id": "73",
    "name": "Philips Hue White and Color Ambiance",
    "label": "Laundry Room Light 02",
    "type": "Philips Hue White and Color Ambiance",
    "room": "Laundry Room",
    "attributes": [
        {
            "name": "colorName",
            "currentValue": "Violet",
            "dataType": "STRING"
        },
        {
            "name": "saturation",
            "currentValue": 41,
            "dataType": "NUMBER"
        },
        {
            "name": "levelPreset",
            "currentValue": null,
            "dataType": "NUMBER"
        },
        {
            "name": "switch",
            "currentValue": "on",
            "dataType": "ENUM",
            "values": [
                "on",
                "off"
            ]
        },
        {
            "name": "colorMode",
            "currentValue": "RGB",
            "dataType": "ENUM",
            "values": [
                "CT",
                "RGB"
            ]
        },
        {
            "name": "effectName",
            "currentValue": "none",
            "dataType": "STRING"
        },
        {
            "name": "switch",
            "currentValue": "on",
            "dataType": "ENUM",
            "values": [
                "on",
                "off"
            ]
        },
        {
            "name": "checkInterval",
            "currentValue": null,
            "dataType": "NUMBER"
        },
        {
            "name": "hue",
            "currentValue": 76,
            "dataType": "NUMBER"
        },
        {
            "name": "RGB",
            "currentValue": null,
            "dataType": "STRING"
        },
        {
            "name": "color",
            "currentValue": null,
            "dataType": "STRING"
        },
        {
            "name": "switch",
            "currentValue": "on",
            "dataType": "ENUM",
            "values": [
                "on",
                "off"
            ]
        },
        {
            "name": "level",
            "currentValue": 100,
            "dataType": "NUMBER"
        },
        {
            "name": "colorTemperature",
            "currentValue": 3401,
            "dataType": "NUMBER"
        },
        {
            "name": "lightEffects",
            "currentValue": "[\"candle\",\"fireplace\",\"color loop\"]",
            "dataType": "JSON_OBJECT"
        },
        {
            "name": "colorName",
            "currentValue": "Violet",
            "dataType": "STRING"
        },
        {
            "name": "healthStatus",
            "currentValue": "online",
            "dataType": "ENUM",
            "values": [
                "unknown",
                "offline",
                "online"
            ]
        },
        {
            "name": "effectName",
            "currentValue": "none",
            "dataType": "STRING"
        }
    ],
    "capabilities": [
        "Flash",
        "Bulb",
        {
            "attributes": [
                {
                    "name": "switch",
                    "dataType": null
                }
            ]
        },
        "Refresh",
        "ColorTemperature",
        {
            "attributes": [
                {
                    "name": "colorTemperature",
                    "dataType": null
                },
                {
                    "name": "colorName",
                    "dataType": null
                }
            ]
        },
        "ColorMode",
        {
            "attributes": [
                {
                    "name": "colorMode",
                    "dataType": null
                }
            ]
        },
        "Light",
        {
            "attributes": [
                {
                    "name": "switch",
                    "dataType": null
                }
            ]
        },
        "Switch",
        {
            "attributes": [
                {
                    "name": "switch",
                    "dataType": null
                }
            ]
        },
        "HealthCheck",
        {
            "attributes": [
                {
                    "name": "checkInterval",
                    "dataType": null
                }
            ]
        },
        "Configuration",
        "Actuator",
        "ColorControl",
        {
            "attributes": [
                {
                    "name": "hue",
                    "dataType": null
                },
                {
                    "name": "saturation",
                    "dataType": null
                },
                {
                    "name": "color",
                    "dataType": null
                },
                {
                    "name": "colorName",
                    "dataType": null
                },
                {
                    "name": "RGB",
                    "dataType": null
                }
            ]
        },
        "LevelPreset",
        {
            "attributes": [
                {
                    "name": "levelPreset",
                    "dataType": null
                }
            ]
        },
        "ChangeLevel",
        "LightEffects",
        {
            "attributes": [
                {
                    "name": "lightEffects",
                    "dataType": null
                },
                {
                    "name": "effectName",
                    "dataType": null
                }
            ]
        },
        "SwitchLevel",
        {
            "attributes": [
                {
                    "name": "level",
                    "dataType": null
                }
            ]
        }
    ],
    "commands": [
        "bindInitiator",
        "configure",
        "flash",
        "identify",
        "off",
        "on",
        "ping",
        "presetLevel",
        "refresh",
        "setColor",
        "setColorTemperature",
        "setColorXy",
        "setEffect",
        "setEnhancedHue",
        "setHue",
        "setLevel",
        "setNextEffect",
        "setPreviousEffect",
        "setSaturation",
        "setScene",
        "startLevelChange",
        "stepColorTemperature",
        "stepHueChange",
        "stepLevelChange",
        "stopLevelChange",
        "toggle"
    ]
}

@ajtatum
Copy link
Author

ajtatum commented Jul 1, 2024

Posted in their forums to see if they can change their API response which I believe would then populate the correct values in Home Assistant. https://community.hubitat.com/t/api-response-from-maker-app-doesnt-populate-rgb-or-color-attributes-for-lights/140039

@ajtatum
Copy link
Author

ajtatum commented Jul 1, 2024

@jason0x43 - Here's a breakdown of the API to perhaps be able to extract color information given different criteria: https://community.hubitat.com/t/api-response-from-maker-app-doesnt-populate-rgb-or-color-attributes-for-lights/140039/3?u=ajtatum

@jason0x43
Copy link
Owner

@ajtatum In the Home Assistant developer tools, what does the state info look like for one of the lights in question? For example, here’s what I get for a Hue color temperature light:

image

I believe the integration is already behaving generally as outlined in the link you mentioned last week. If a bulb is in CT mode, it will report that to Home Assistant, and will have a color temp attribute (taken from the colorTemperature value from Hubitat). If a bulb is in RGB mode, it will report its mode as HS (hue saturation) to Home Assistant, and will return an HS color value to Home Assistant (taken from the hue and saturation values from Hubitat). The light entity should have color_temp, hs_color, and rgb_color attributes that reflect the values from Hubitat.

In general light entities (from this integration or others) will not provide separate sensors for every light attribute. Those values are attributes of the light entity, and can be used directly in automations. Light devices may also provide device triggers for attributes, although this integration currently only provides device triggers for button presses.

@ajtatum
Copy link
Author

ajtatum commented Jul 8, 2024

@jason0x43 - Here is what I get for the Hue lights:

min_color_temp_kelvin: 2000
max_color_temp_kelvin: 6535
min_mireds: 153
max_mireds: 500
supported_color_modes:
  - color_temp
  - hs
color_mode: hs
brightness: 102
color_temp_kelvin: null
color_temp: null
hs_color:
  - 180
  - 12
rgb_color:
  - 224
  - 255
  - 255
xy_color:
  - 0.29
  - 0.332
friendly_name: Laundry Room Light 01
supported_features: 8

Sorry I know this is more of a Home Assistant question, but how would I be able to use the RGB values in an automation? Or is that not possible?

@jason0x43
Copy link
Owner

You can use a template trigger:

Screenshot 2024-08-30 at 20 31 29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants