@@ -19,7 +19,7 @@ export const gridElement = (
1919 ? outageTarget
2020 : typeof entities . grid ! . entity === "string"
2121 ? entities . grid ! . entity
22- : entities . grid ! . entity . production ! ;
22+ : entities . grid ! . entity . consumption ! ;
2323 main . openDetails ( e , target ) ;
2424 } }
2525 @keyDown =${ ( e : { key : string ; stopPropagation : ( ) => void } ) => {
@@ -30,7 +30,7 @@ export const gridElement = (
3030 ? outageTarget
3131 : typeof entities . grid ! . entity === "string"
3232 ? entities . grid ! . entity
33- : entities . grid ! . entity . production ! ;
33+ : entities . grid ! . entity . consumption ! ;
3434 main . openDetails ( e , target ) ;
3535 }
3636 } }
@@ -67,7 +67,19 @@ export const gridElement = (
6767 grid . state . fromGrid !== null &&
6868 ! grid . powerOutage . isOutage ) ||
6969 ( grid . powerOutage . isOutage && ! ! grid . powerOutage . entityGenerator )
70- ? html ` < span class ="consumption ">
70+ ? html ` < span
71+ class ="consumption "
72+ @click =${ ( e : { stopPropagation : ( ) => void } ) => {
73+ const target = typeof entities . grid ! . entity === "string" ? entities . grid ! . entity : entities . grid ! . entity . consumption ! ;
74+ main . openDetails ( e , target ) ;
75+ } }
76+ @keyDown =${ ( e : { key : string ; stopPropagation : ( ) => void } ) => {
77+ if ( e . key === "Enter" ) {
78+ const target = typeof entities . grid ! . entity === "string" ? entities . grid ! . entity : entities . grid ! . entity . consumption ! ;
79+ main . openDetails ( e , target ) ;
80+ }
81+ } }
82+ >
7183 < ha-icon class ="small " .icon =${ "mdi:arrow-right" } > </ ha-icon > ${ displayValue ( main . hass , grid . state . fromGrid ) }
7284 </ span > `
7385 : "" }
0 commit comments