question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Group hasn't `lights` property

See original GitHub issue

class Group check lights attribute, but don’t hold it.

if (!this._attributes.lights) {
   throw new ApiError('Missing a valid lights attribute for the Group');
}

It’s a normal behavior, or a bug?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
peter-murraycommented, Jan 2, 2020

This is intentional, a user should never get one of these instances now, as the types from the bridge itself will be instantiated.

It is done this way due to the lights attribute being required in some groups and not others, but without a lot of hacking of the type system in use to support this one edge case, where I would like to toggle the required state on the attribute, it is just considerably easier to ensure that the concrete classes pass the attribute for the lights configured to what it wants.

This is in line with what I had to do in some of the sensor based objects as well.

0reactions
peter-murraycommented, Jan 13, 2020

Updated in 4.0.3

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lights Out but Circuit Breaker Not Tripped | Mr. Electric
If your lights are dimming or flickering after turning on a large appliance (but your circuit breaker has not tripped), this could mean...
Read more >
Is a new homeowner responsible for previous utility bills?
If the utility company that provides water and sewer is a private entity, the unpaid bills may go to collections in the name...
Read more >
10 Reasons For Lights Flickering In Your Home - Bates Electric
If lights are flickering in several areas of your house, it could be an issue with the main connection or service cable connection....
Read more >
When you can claim rights to a home you've lived in but don't ...
When you can claim rights to a home you've lived in but don't own ; 1 · How to stop your LED lights...
Read more >
Frequently Asked Questions about Utilities for Landlords and ...
Who Pays the Deposit With the Utility Company for a New Account? Is the Landlord Allowed to Shut Off Tenant's Utilities?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found