@@ -27,6 +27,7 @@ const DeviceCard = {
2727 const d = opts . device ;
2828 const isUnsupported = d . unsupported === true ;
2929 const isIgnored = d . ignored === true ;
30+ const isKeypad = d . isKeypad === true ;
3031
3132 const col = document . createElement ( 'div' ) ;
3233 col . className = 'col-6 col-md-4 col-lg-3 mb-3' ;
@@ -94,8 +95,8 @@ const DeviceCard = {
9495
9596 metaRow . appendChild ( meta ) ;
9697
97- // Toggle — inline with meta, only for non-unsupported devices
98- if ( ! isUnsupported ) {
98+ // Toggle — inline with meta, only for non-unsupported, non-keypad devices
99+ if ( ! isUnsupported && ! isKeypad ) {
99100 const switchWrap = document . createElement ( 'div' ) ;
100101 switchWrap . className = 'form-check form-switch mb-0' ;
101102 switchWrap . addEventListener ( 'click' , ( e ) => e . stopPropagation ( ) ) ;
@@ -126,7 +127,13 @@ const DeviceCard = {
126127 const badgeArea = document . createElement ( 'div' ) ;
127128 let hasBadge = false ;
128129
129- if ( isUnsupported ) {
130+ if ( isKeypad ) {
131+ const badge = document . createElement ( 'span' ) ;
132+ badge . className = 'badge bg-secondary' ;
133+ badge . textContent = 'Not available for HomeKit' ;
134+ badgeArea . appendChild ( badge ) ;
135+ hasBadge = true ;
136+ } else if ( isUnsupported ) {
130137 const badge = document . createElement ( 'span' ) ;
131138 badge . className = 'badge badge-unsupported' ;
132139 badge . textContent = 'Not Supported' ;
@@ -150,10 +157,15 @@ const DeviceCard = {
150157 card . appendChild ( body ) ;
151158 if ( hasBadge ) card . appendChild ( footer ) ;
152159
153- // Click handler — navigate to detail
154- card . addEventListener ( 'click' , ( ) => {
155- if ( opts . onClick ) opts . onClick ( d ) ;
156- } ) ;
160+ // Click handler — navigate to detail (disabled for keypads)
161+ if ( isKeypad ) {
162+ card . style . cursor = 'default' ;
163+ card . title = 'Keypads have no configurable HomeKit settings. The keypad works alongside your station but cannot be exposed to HomeKit.' ;
164+ } else {
165+ card . addEventListener ( 'click' , ( ) => {
166+ if ( opts . onClick ) opts . onClick ( d ) ;
167+ } ) ;
168+ }
157169
158170 col . appendChild ( card ) ;
159171 if ( container ) container . appendChild ( col ) ;
0 commit comments