diff --git a/homeassistant/components/habitica/sensor.py b/homeassistant/components/habitica/sensor.py index 7a84d589bfb..385e1e8d1f4 100644 --- a/homeassistant/components/habitica/sensor.py +++ b/homeassistant/components/habitica/sensor.py @@ -33,6 +33,7 @@ from .util import ( pending_quest_items, quest_attributes, quest_boss, + rage_attributes, ) _LOGGER = logging.getLogger(__name__) @@ -111,6 +112,8 @@ class HabiticaSensorEntity(StrEnum): BOSS_HP = "boss_hp" BOSS_HP_REMAINING = "boss_hp_remaining" COLLECTED_ITEMS = "collected_items" + BOSS_RAGE = "boss_rage" + BOSS_RAGE_LIMIT = "boss_rage_limit" SENSOR_DESCRIPTIONS: tuple[HabiticaSensorEntityDescription, ...] = ( @@ -342,6 +345,25 @@ SENSOR_DESCRIPTIONS_PARTY: tuple[HabiticaPartySensorEntityDescription, ...] = ( else None ), ), + HabiticaPartySensorEntityDescription( + key=HabiticaSensorEntity.BOSS_RAGE, + translation_key=HabiticaSensorEntity.BOSS_RAGE, + value_fn=lambda p, _: p.quest.progress.rage, + entity_picture=ha.RAGE, + suggested_display_precision=2, + ), + HabiticaPartySensorEntityDescription( + key=HabiticaSensorEntity.BOSS_RAGE_LIMIT, + translation_key=HabiticaSensorEntity.BOSS_RAGE_LIMIT, + value_fn=( + lambda p, c: boss.rage.value + if (boss := quest_boss(p, c)) and boss.rage + else None + ), + entity_picture=ha.RAGE, + suggested_display_precision=0, + attributes_fn=rage_attributes, + ), ) diff --git a/homeassistant/components/habitica/strings.json b/homeassistant/components/habitica/strings.json index 1d62b242149..3ea0a29ec5a 100644 --- a/homeassistant/components/habitica/strings.json +++ b/homeassistant/components/habitica/strings.json @@ -8,6 +8,7 @@ "unit_mana_points": "MP", "unit_experience_points": "XP", "unit_items": "items", + "unit_rage": "rage", "config_entry_description": "Select the Habitica account to update a task.", "task_description": "The name (or task ID) of the task you want to update.", "rename_name": "Rename", @@ -459,6 +460,22 @@ "collected_items": { "name": "Collected quest items", "unit_of_measurement": "[%key:component::habitica::common::unit_items%]" + }, + "boss_rage_limit": { + "name": "Boss rage limit break", + "unit_of_measurement": "[%key:component::habitica::common::unit_rage%]", + "state_attributes": { + "rage_skill": { + "name": "Rage skill" + }, + "effect": { + "name": "Effect" + } + } + }, + "boss_rage": { + "name": "Boss rage", + "unit_of_measurement": "[%key:component::habitica::common::unit_rage%]" } }, "switch": { diff --git a/homeassistant/components/habitica/util.py b/homeassistant/components/habitica/util.py index 8c2148192a3..7ba4ddb11f8 100644 --- a/homeassistant/components/habitica/util.py +++ b/homeassistant/components/habitica/util.py @@ -196,6 +196,15 @@ def quest_attributes(party: GroupData, content: ContentData) -> dict[str, Any]: } +def rage_attributes(party: GroupData, content: ContentData) -> dict[str, Any]: + """Display name of rage skill and description of it's effect in attributes.""" + boss = quest_boss(party, content) + return { + "rage_skill": boss.rage.title if boss and boss.rage else None, + "effect": boss.rage.effect if boss and boss.rage else None, + } + + def quest_boss(party: GroupData, content: ContentData) -> QuestBoss | None: """Quest boss.""" diff --git a/tests/components/habitica/fixtures/content.json b/tests/components/habitica/fixtures/content.json index e66186860c7..7e2017d1683 100644 --- a/tests/components/habitica/fixtures/content.json +++ b/tests/components/habitica/fixtures/content.json @@ -388,6 +388,18 @@ "count": 20 } }, + "boss": { + "name": "boss name", + "hp": 500, + "rage": { + "title": "rage skill name", + "description": "description", + "value": 50, + "effect": "skill effect" + }, + "str": 1, + "def": 1 + }, "drop": { "items": [ { diff --git a/tests/components/habitica/fixtures/party.json b/tests/components/habitica/fixtures/party.json index 18e7936ca85..4d011ccef73 100644 --- a/tests/components/habitica/fixtures/party.json +++ b/tests/components/habitica/fixtures/party.json @@ -9,7 +9,9 @@ "progress": { "collect": { "soapBars": 10 - } + }, + "hp": 50, + "rage": 3.14 }, "key": "atom1", "active": true, diff --git a/tests/components/habitica/snapshots/test_sensor.ambr b/tests/components/habitica/snapshots/test_sensor.ambr index 89d6936f111..ae6256b41d6 100644 --- a/tests/components/habitica/snapshots/test_sensor.ambr +++ b/tests/components/habitica/snapshots/test_sensor.ambr @@ -1114,7 +1114,7 @@ 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unknown', + 'state': '500.0', }) # --- # name: test_sensors[sensor.test_user_s_party_boss_health_remaining-entry] @@ -1167,7 +1167,115 @@ 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unknown', + 'state': '50.0', + }) +# --- +# name: test_sensors[sensor.test_user_s_party_boss_rage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.test_user_s_party_boss_rage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Boss rage', + 'platform': 'habitica', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': , + 'unique_id': 'a380546a-94be-4b8e-8a0b-23e0d5c03303_1e87097c-4c03-4f8c-a475-67cc7da7f409_boss_rage', + 'unit_of_measurement': 'rage', + }) +# --- +# name: test_sensors[sensor.test_user_s_party_boss_rage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'entity_picture': 'data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSItMiAtMiAxOCAyMCI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48ZyBmaWxsLXJ1bGU9Im5vbnplcm8iPjxnPjxnPjxnPjxwYXRoIGZpbGw9IiMyNENDOEYiIGQ9Ik0wIDZMNS44MzMgMCAxMS42NjcgNiA1LjgzMyAxNnoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC01MjQgLTIwNzApIHRyYW5zb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9nPjwvZz48L3N2Zz4=', + 'friendly_name': "test-user's Party Boss rage", + 'unit_of_measurement': 'rage', + }), + 'context': , + 'entity_id': 'sensor.test_user_s_party_boss_rage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '3.14', + }) +# --- +# name: test_sensors[sensor.test_user_s_party_boss_rage_limit_break-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.test_user_s_party_boss_rage_limit_break', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Boss rage limit break', + 'platform': 'habitica', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': , + 'unique_id': 'a380546a-94be-4b8e-8a0b-23e0d5c03303_1e87097c-4c03-4f8c-a475-67cc7da7f409_boss_rage_limit', + 'unit_of_measurement': 'rage', + }) +# --- +# name: test_sensors[sensor.test_user_s_party_boss_rage_limit_break-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'effect': 'skill effect', + 'entity_picture': 'data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSItMiAtMiAxOCAyMCI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48ZyBmaWxsLXJ1bGU9Im5vbnplcm8iPjxnPjxnPjxnPjxwYXRoIGZpbGw9IiMyNENDOEYiIGQ9Ik0wIDZMNS44MzMgMCAxMS42NjcgNiA1LjgzMyAxNnoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC01MjQgLTIwNzApIHRyYW5zbGF0ZSg0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L3N2Zz4=', + 'friendly_name': "test-user's Party Boss rage limit break", + 'rage_skill': 'rage skill name', + 'unit_of_measurement': 'rage', + }), + 'context': , + 'entity_id': 'sensor.test_user_s_party_boss_rage_limit_break', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '50.0', }) # --- # name: test_sensors[sensor.test_user_s_party_collected_quest_items-entry] @@ -1415,7 +1523,7 @@ 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'unknown', + 'state': 'boss name', }) # --- # name: test_sensors[sensor.test_user_saddles-entry]