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

fix(mqtt-ad): change default for central scene value_template #3581

Closed

Conversation

ccutrer
Copy link
Contributor

@ccutrer ccutrer commented Feb 3, 2024

to be a number, not a string, since it's a number data type now

refs #3570

tested against openHAB and Home Assistant

to be a number, not a string, since it's a number data type now

refs zwave-js#3570
@coveralls
Copy link

Pull Request Test Coverage Report for Build 7769538201

  • 0 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 22.076%

Totals Coverage Status
Change from base Build 7738176768: 0.0%
Covered Lines: 3763
Relevant Lines: 18124

💛 - Coveralls

@ccutrer ccutrer changed the title change default for central_scene value_template for MQTT AD fix(mqtt-ad): change default for central scene value_template Feb 3, 2024
@ccutrer
Copy link
Contributor Author

ccutrer commented Feb 5, 2024

ugh, this won't work. 0 is a valid scene id. I'll look into it more tomorrow

@kpine
Copy link
Contributor

kpine commented Feb 5, 2024

The original change was to add state_class, what does that accomplish exactly?

Anything done here, except for allowing a None value, breaks previous behavior, no?

@ccutrer
Copy link
Contributor Author

ccutrer commented Feb 5, 2024

Anything done here, except for allowing a None value, breaks previous behavior, no?

Indeed. I did attempt to not have a default at all, so that None would flow through, but Home Assistant logs a warning, and interprets it as 0 (which is what made me think to set the default to 0 for this PR). The original addition of state_class was simply done as a "hey, while I'm looking at Central Scene (because I'm getting a read-only entity for something that should be read/write), it's a number anyway, and it would be good to have it treated as such." That's not really a super-important goal if it causes other issues, and I agree that those issues with having no value are not worth that trade-off. I'll send a new PR to revert just the state_class portion.

@ccutrer ccutrer closed this Feb 5, 2024
@ccutrer
Copy link
Contributor Author

ccutrer commented Feb 5, 2024

See #3582

@ccutrer ccutrer deleted the central-scene-default-mqtt-ad branch February 5, 2024 15:45
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

Successfully merging this pull request may close these issues.

3 participants