Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions homeassistant/components/jewish_calendar/quality_scale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
rules:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    JewishCalendarSensorDescription(
        key="date",
        translation_key="hebrew_date",
        value_fn=lambda info: str(info.hdate),
        attr_fn=lambda info: {
            "hebrew_year": str(info.hdate.year),
            "hebrew_month_name": str(info.hdate.month),
            "hebrew_day": str(info.hdate.day),
        },
    ),

Would it make sense to create separate entities for these attributes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. We discussed this already. The date provides all of them in a single string.
Sometimes it makes sense knowing the day/month/year value by itself, but in most cases, the date is good enough.
It's a real attribute of the sensor.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we disable them by default? I mean it sounds like it has a reason for users to automate on them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had this discussion here: #116252 (comment)

# Bronze
action-setup: done
appropriate-polling: done
brands: done
common-modules: done
config-flow-test-coverage: done
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we test that the option flow refreshes the entry?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Refreshes" meaning that the updated values are taken into consideration?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

config-flow: done
dependency-transparency: done
docs-actions: done
docs-high-level-description: done
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove the
image
parenthesis here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs-installation-instructions: done
docs-removal-instructions: done
entity-event-setup:
status: exempt
comment: Entities of this integration do not explicitly subscribe to events.
entity-unique-id: done
has-entity-name: done
runtime-data: done
test-before-configure:
status: exempt
comment: Local calculation does not require configuration.
test-before-setup:
status: exempt
comment: Local calculation does not require setup.
unique-config-entry: done

# Silver
action-exceptions: done
config-entry-unloading: done
docs-configuration-parameters: done
docs-installation-parameters: done
Comment on lines +36 to +37
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a neat table you can use to format this, now everything is their own header

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

entity-unavailable:
status: exempt
comment: This integration cannot be unavailable since it's a local calculation.
integration-owner: done
log-when-unavailable:
status: exempt
comment: This integration cannot be unavailable since it's a local calculation.
parallel-updates: done
reauthentication-flow:
status: exempt
comment: This integration does not require reauthentication, since it is a local calculation.
test-coverage: done
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also expect tests for the runtime of the integration

Copy link
Contributor Author

@tsvi tsvi Jul 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually we have those, but maybe we should rename and reorganize those a bit:


# Gold
devices:
status: exempt
comment: This integration does not represent physical devices.
diagnostics: done
discovery-update-info:
status: exempt
comment: This is a local calculation and does not require discovery.
discovery:
status: exempt
comment: This is a local calculation and does not require discovery.
docs-data-update: todo
docs-examples: todo
docs-known-limitations:
status: exempt
comment: No known limitations.
docs-supported-devices:
status: exempt
comment: This integration does not support physical devices.
docs-supported-functions: done
docs-troubleshooting:
status: exempt
comment: There are no more detailed troubleshooting instructions available.
docs-use-cases: todo
dynamic-devices:
status: exempt
comment: This integration does not have devices.
entity-category: done
entity-device-class: done
entity-disabled-by-default: done
entity-translations: done
exception-translations: done
icon-translations: done
reconfiguration-flow: done
repair-issues:
status: exempt
comment: There are no issues that can be repaired.
stale-devices:
status: exempt
comment: This integration does not have devices.

# Platinum
async-dependency: todo
inject-websession:
status: exempt
comment: This integration does not require a web session.
strict-typing: done
1 change: 0 additions & 1 deletion script/hassfest/quality_scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,6 @@ class Rule:
"itunes",
"izone",
"jellyfin",
"jewish_calendar",
"joaoapps_join",
"juicenet",
"justnimbus",
Expand Down