Digital-Alchemy-TS / hass

Typescript APIs for Home Assistant. Includes rest & websocket bindings
https://docs.digital-alchemy.app
MIT License
8 stars 2 forks source link

Add ownKeys & has operators to proxies #64

Closed zoe-codez closed 2 months ago

zoe-codez commented 2 months ago

📬 Changes

add ownKeys, has, apply, set as appropriate (and sometimes inappropriate) to hass.call & entity refs

const reference = hass.refBy.id("...");
if( "turn_on" in reference ) {
 // do stuff
}

🗒️ Checklist

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 77.19%. Comparing base (c14ab52) to head (2bc487d). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #64 +/- ## ========================================== + Coverage 76.72% 77.19% +0.46% ========================================== Files 36 36 Lines 1431 1460 +29 Branches 174 177 +3 ========================================== + Hits 1098 1127 +29 + Misses 313 312 -1 - Partials 20 21 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.