Digital-Alchemy-TS / hass

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

type safe entity ref tests #58

Open zoe-codez opened 1 month ago

zoe-codez commented 1 month ago

Bug description

const houseCO2Sensors = hass.refBy.label('house_co2_sensors')
        const sensor = hass.refBy.id('some_house_sensor')

        if (houseCO2Sensors.includes(sensor)) {
Argument of type 'ByIdProxy<TRawEntityIds>' is not assignable to parameter of type 'ByIdProxy<"sensor...

This test should be valid, does but types aren't transferring around as expected

zoe-codez commented 1 month ago

@chrisdrackett

chrisdrackett commented 1 month ago

thanks, was just about to add this :D