Package: Dna Tv Hub
Version: 1.0.0
Description: Template switch for DNA TV Hub remote control
Executive Summary
This package creates a simplified "Master Switch" for the DNA TV Hub, wrapping the underlying remote control commands into a single boolean entity. This allows the TV Hub to be treated like a standard appliance (On/Off) in dashboards and voice commands, abstrating the complexity of the remote service calls.
Process Description (Non-Technical)
- Switch Action: When you toggle the "DNA TV HUB" switch on the dashboard.
- Service Call: The system translates this into a
remote.turn_onorremote.turn_offcommand sent to the specific hub device. - State Feedback: The switch icon lights up based on the actual state reported by the device, establishing a two-way sync.
Dashboard Connections
No specific entities detected to link.
Architecture Diagram
The architecture is a simple wrapper pattern. The Template Switch sits between the User and the Remote entity. It intercepts the On/Off intent and routes it to the correct service call, while simultaneously reflecting the Remote's state back to the UI.
sequenceDiagram
participant User as Dashboard
participant Switch as Template Switch
participant Remote as Remote Service
participant Device as DNA TV Hub
User->>Switch: Toggle ON
Switch->>Remote: Call remote.turn_on
Remote->>Device: Send IR/IP Command
Device-->>Remote: Report State "On"
Remote-->>Switch: Update State "On"
Configuration (Source Code)
# ------------------------------------------------------------------------------
# Package: DNA TV Hub
# Version: 1.0.0
# Description: Template switch for DNA TV Hub remote control
# Dependencies: remote.dna_tv_hub
# ------------------------------------------------------------------------------
template:
- switch:
- name: "DNA TV HUB"
unique_id: dna_tv_hub
icon: mdi:television
state: "{{ is_state('remote.dna_tv_hub', 'on') }}"
turn_on:
service: remote.turn_on
target:
entity_id: remote.dna_tv_hubi
turn_off:
service: remote.turn_off
target:
entity_id: remote.dna_tv_hubi
