The ctgpdx sensor provides the latest CTGP Deluxe version available, allowing you to get notified when updates are released.
- Latest Version: Tracks the current version of CTGP Deluxe.
- Download Size: Shows the size of the download package.
- Unpacked Size: Shows the required space on the SD card.
- Release Date: Displays when the latest version was released.
- Update Notifications: Use automations to get alerted on new releases.
This integration can be added to HACS as a Custom Repository.
- Open HACS.
- Click on the 3 dots in the top right corner -> Custom repositories.
- Add
https://github.com/FaserF/ha-ctgpdxand select category Integration. - Click Download.
- Download the latest Release.
- Extract the ZIP file.
- Copy the
ctgpdxfolder to<config>/custom_components/.
- Go to Settings -> Devices & Services.
- Click Add Integration.
- Search for CTGP Deluxe.
None needed.
After installation, the suivant sensors will be available:
| Sensor | Name | Icon | Description |
|---|---|---|---|
sensor.ctgp_dx_latest_version |
CTGP-DX Latest Version | mdi:nintendo-switch |
The current version number (includes Release Date as attribute) |
sensor.ctgp_dx_download_size |
CTGP-DX Download Size | mdi:download-network |
Size of the ZIP file (Disabled by default) |
sensor.ctgp_dx_unpacked_size |
CTGP-DX Unpacked Size | mdi:folder-zip |
Space needed on SD card (Disabled by default) |
Below are several examples of how you can use this integration in your automations.
1. Basic Notification on New Version (Mobile App)
This automation sends a notification to your phone whenever a new version is detected.
- id: 'ctgpdx_new_version_notification'
alias: 'CTGP-DX: New Version Available'
trigger:
- platform: state
entity_id: sensor.ctgp_dx_latest_version
condition:
- condition: template
value_template: "{{ trigger.to_state.state not in ['unknown', 'unavailable'] }}"
- condition: template
value_template: "{{ trigger.from_state.state not in ['unknown', 'unavailable'] }}"
- condition: template
value_template: "{{ trigger.to_state.state != trigger.from_state.state }}"
action:
- service: notify.mobile_app_your_device
data:
title: '🎉 New CTGP-DX Version Available!'
message: >
New CTGP-DX Version **{{ states('sensor.ctgp_dx_latest_version') }}** released at {{ state_attr('sensor.ctgp_dx_latest_version', 'release_date') }} is now available!
Download: {{ state_attr('sensor.ctgp_dx_latest_version', 'data_provided_by') }}
data:
url: "{{ state_attr('sensor.ctgp_dx_latest_version', 'data_provided_by') }}"
clickAction: "{{ state_attr('sensor.ctgp_dx_latest_version', 'data_provided_by') }}"
mode: single2. Conditional Notification (Only if Update is Large)
Get notified only if the download size is greater than 2 GB.
- alias: 'CTGP-DX: Large Update Alert'
trigger:
- platform: state
entity_id: sensor.ctgp_dx_latest_version
condition:
- condition: template
value_template: "{{ states('sensor.ctgp_dx_download_size') | replace(' GB', '') | float > 2.0 }}"
action:
- service: notify.persistent_notification
data:
title: 'Huge Update Detected'
message: 'A large CTGP-DX update ({{ states("sensor.ctgp_dx_download_size") }}) is out! Make sure your SD card has space.'3. Announcement via Smart Speaker (TTS)
Announce the update via Alexa or Google Home.
- alias: 'CTGP-DX: Voice Announcement'
trigger:
- platform: state
entity_id: sensor.ctgp_dx_latest_version
condition:
- condition: template
value_template: "{{ trigger.to_state.state != trigger.from_state.state }}"
action:
- service: tts.google_say
target:
entity_id: media_player.living_room_speaker
data:
message: "Attention! A new version of CTGP Deluxe, version {{ states('sensor.ctgp_dx_latest_version') }}, has just been released."4. Dashboard Alert (Conditional Card)
You can also use the version sensor to show a conditional card on your dashboard only when the version matches a certain pattern or changes.
# In your Lovelace configuration
type: conditional
conditions:
- entity: sensor.ctgp_dx_latest_version
state_not: "unknown"
card:
type: entities
entities:
- entity: sensor.ctgp_dx_latest_version
name: "Latest Mod Version"Open an issue over at GitHub issues. Please prefer sending over a log with debugging enabled.
To enable debugging enter the following in your configuration.yaml:
logger:
logs:
custom_components.ctgpdx: debugThe data is scraped from the official ctgpdx.com website. All credits for the mod go to the CTGP Deluxe Team!