Releases: qui3xote/ottoscript
Releases · qui3xote/ottoscript
v0.4 - The one about stability
v0.4 brings a lot of 'under the hood' work to make features that existed in 0.3 more reliable, as well as more predictable.
User facing changes:
- SWITCH statement replaces the old 'CASE'. The new SWITCH is cleaner to write, with less 'END' statements.
- Access attributes on entities, dictionaries (and variables containing those things) by using :attrname on the end.
- Entities now have some special OttoScript attributes: name & domain, so that you can check what entity is held by a variable.
- Trigger variables are now available in every automation, by default as
@trigger. You can switch that name for something else if you like. - Much improved debugging output to the logs.
What's Changed
Full Changelog: v0.3...v0.4
v0.3 - Areas, Trigger Variables, Time Triggers and Automation Controls
A big step forward for OttoScript:
- Name your automations and choose a mode (single vs restart)
- Time triggers (
WHEN 07:00 on mon, tue,30 MINUTES AFTER SUNRISE) @triggera special variable containing information about what triggered this execution- Areas now supported
- AND area shortcuts! Finally, group your areas into larger areas! And group your area groups into even larger areas!
- Global Vars - variables assigned outside an automation are now available read-only within your automations (same file only)
What's Changed
- If end by @qui3xote in #14
- v0.2 by @qui3xote in #16
- Update of Trigger Logic by @qui3xote in #17
- Var handling by @qui3xote in #18
- Time by @qui3xote in #19
- Auto names by @qui3xote in #20
- Support for Areas by @qui3xote in #21
- Area support by @qui3xote in #23
- Dev by @qui3xote in #24
Full Changelog: v0.2...v0.3
Fancy Logic, Variables and call any HA service!
v0.2 brings OttoScript from proof of concept to a very usable language:
New Features:
- Variable support! Variables can be assigned (
@brightness = 50%) and used within the same automation (DIM light.office to @brightness) - CASE Statement - works just like 'Choose' in Home assistant.
- IF/THEN/ELSE Support!
- Nested logic - you can now embed IF/THEN/ELSE inside another conditional statement (see readme)
- CALL command - call any HomeAssistant service on any entity and pass any number of arguments (see readme)
- Expanded readme with more examples and list of supported commands
Language/Breaking Changes
- Conditional statements now must be closed off with the END keyword
- Dictionaries - you can pass dictionaries to service calls (brightness_pct=50, color='XXXX')
- THEN keyword is now optional (may be removed entirely in future release)
Developer Changes
- Lots of code linting for readability
- Significant module reorganization for clarity
- Conditionals now refactored to control their own evaluation and command execution
- Base class moved from vocab to OttoBase.
What's Changed
- Conditional refactor by @qui3xote in #8
- Revert "Conditional refactor" by @qui3xote in #9
- Conditional Refactor Replay by @qui3xote in #10
- Variable support by @qui3xote in #12
- List, Dict & With by @qui3xote in #13
- If end by @qui3xote in #14
- Fully operational deathstar by @qui3xote in #15
- v0.2 by @qui3xote in #16
Full Changelog: 0.1...0.2
OttoScript Proof of Concept
The 0.1 release brings a fully working( I think!) proof-of-concept DSL to HomeAssistant. Working features include:
- State-based triggers, including specifying old and new states
- Working IF statements, with full support for AND/OR/NOT chaining of comparisons, and support standard
= > < !=etc. - Ability to get the current state of entities and their attributes (currently limited to one attribute at a time)
- A working suite of simple commands (
TURN ON,TURN OFF,WAIT,TOGGLE,LOCK,UNLOCK, andDIM) - Support for Interpreter classes that can communicate Otto expressions to HomeAssistant or other automation systems.
- Specify time values in timestamp (
00:00:00) or relative45 MINUTESformats.
Known Issues:
Variable assignments and references are grammatically supported but lack scaffolding to actually work in practice.