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

Add Image Entities for program images and channel icons #39

Merged
merged 13 commits into from
Feb 28, 2025

Conversation

shadow578
Copy link
Owner

@shadow578 shadow578 commented Feb 14, 2025

This PR adds three new 'classes' of image entity for each channel:

  • image.<channel>_icon: the icon of a channel
  • image.<channel>_program_image_current: current program image
  • image.<channel>_program_image_upcoming: upcoming program image

these entites can be enabled in the options flow. they are disabled by default.

additional changes:

  • add additional mime type for gzip compressed responses
  • for each channel, create a 'device' to group all entities belonging to this channel to

Images

upcoming_program_image channel icon
Upcoming Program Image Entity Channel Icon Entity

Copy link

codecov bot commented Feb 14, 2025

Codecov Report

Attention: Patch coverage is 95.23810% with 13 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
custom_components/xmltv_epg/image.py 88.78% 12 Missing ⚠️
custom_components/xmltv_epg/helper.py 92.85% 1 Missing ⚠️
Files with missing lines Coverage Δ
custom_components/xmltv_epg/__init__.py 100.00% <ø> (ø)
custom_components/xmltv_epg/api.py 72.22% <100.00%> (ø)
custom_components/xmltv_epg/config_flow.py 97.56% <ø> (ø)
custom_components/xmltv_epg/const.py 100.00% <100.00%> (ø)
custom_components/xmltv_epg/coordinator.py 96.42% <100.00%> (+0.59%) ⬆️
custom_components/xmltv_epg/entity.py 100.00% <100.00%> (ø)
custom_components/xmltv_epg/model/channel.py 91.48% <100.00%> (+0.79%) ⬆️
custom_components/xmltv_epg/model/program.py 93.75% <100.00%> (+0.27%) ⬆️
custom_components/xmltv_epg/sensor.py 93.68% <100.00%> (+0.35%) ⬆️
test/const.py 100.00% <ø> (ø)
... and 8 more

@shadow578 shadow578 linked an issue Feb 14, 2025 that may be closed by this pull request
3 tasks
@shadow578 shadow578 mentioned this pull request Feb 14, 2025
3 tasks
@shadow578 shadow578 force-pushed the add/images-support branch 2 times, most recently from 34d48ea to adb32f9 Compare February 21, 2025 07:34
@shadow578 shadow578 merged commit 8005243 into main Feb 28, 2025
10 checks passed
@shadow578 shadow578 deleted the add/images-support branch February 28, 2025 10:50
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.

Add image in attributes
1 participant