Digital-Alchemy-TS / Digital-Alchemy-TS/type-writer
Add support for filters in service parameters
- Dominant language
- TypeScript
- Stars
- 6
- Forks
- 4
- Avg merge
- 35m
- Merged PRs (30d)
- 1
Description
Example service call
```typescript
function MyService({ hass }: TServiceParams) {
const sensor = hass.entity.byId("sensor.example_sensor");
sensor.onUpdate(async () => {
await hass.call.light.turn_on({
transition: 10,
entity_id: "light.example_light"
})
})
}
```
There is no straightforward way to tell if a given entity should be allowed to call the service, with the property `transition`, based on in editor information
Contributor guide
Research direction
Start by tracing how TServiceParams and hass.call.light.turn_on are represented in the generated service API. Define how filters should use editor information to decide whether an entity may call a service with properties such as transition. Done means service parameters can express that restriction for the example case, with the generated types or API behavior making the allowed call clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100