You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* need to work with strings, not posixpath
* try to slim down and improve requirements/deps process
* separate app dir and project dir
* set log level in __main__
* improve docker docs
* replace em dashes with dashes
* additional docs cleanup
* remove value converters doc, will re-add when i have time to make a good one that i trust
* update changelog, fix links to not use ./
Copy file name to clipboardExpand all lines: docs/pages/advanced/index.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,10 @@ Hassette does a lot under the hood to make building Home Assistant automations e
4
4
5
5
These features are:
6
6
7
-
- Dependency injection
8
-
- Custom states
9
-
- The State Registry
10
-
- The Type Registry
7
+
-[Dependency injection](dependency-injection.md)
8
+
-[Custom states](custom-states.md)
9
+
-[The State Registry](state-registry.md)
10
+
-[The Type Registry](type-registry.md)
11
11
12
12
## Dependency Injection
13
13
@@ -19,7 +19,7 @@ For example, `StateNew` is a built-in provider that extracts the new state from
19
19
20
20
This is as simple as using the [`Annotated`][typing.Annotated] type hint to specify a type and an extractor. Hassette does have an [accessor][hassette.event_handling.accessors] module that has built-in extractors, so for this example you could use `get_state_attr_new`. Combining these tools allows you to create powerful, reusable DI providers for your specific needs.
21
21
22
-
Read more in the [Dependency Injection guide][pages/advanced/dependency-injection.md].
22
+
Read more in the [Dependency Injection guide](dependency-injection.md).
23
23
24
24
## Custom States
25
25
@@ -30,7 +30,7 @@ Home Assistant has many built in states, but many many more states that come fro
30
30
Custom states can be defined as simply as creating a new State class from [`BaseState`][hassette.models.states.base.BaseState] or one if it's subclasses. `BaseState`
31
31
uses `__init_subclass__` to automatically register the class with the [State Registry][hassette.core.state_registry.StateRegistry] based on its `domain` attribute. This means that once you have defined the class, it will be used automatically whenever a state with the matching domain is encountered in your automations.
32
32
33
-
There is a dedicated [Custom States guide][pages/advanced/custom-states.md] that goes into more detail on how to define and use custom states in your Hassette apps.
33
+
There is a dedicated [Custom States guide](custom-states.md) that goes into more detail on how to define and use custom states in your Hassette apps.
34
34
35
35
## Registries
36
36
@@ -42,7 +42,7 @@ The State Registry contains a map of state domain names to their corresponding S
42
42
43
43
The State Registry generally does not need to be interacted with directly, as the `__init_subclass__` hook automatically registers new State classes when they are defined.
44
44
45
-
You can read more about the State Registry in the [State Registry guide][pages/advanced/state-registry.md].
45
+
You can read more about the State Registry in the [State Registry guide](state-registry.md).
46
46
47
47
### Type Registry
48
48
@@ -51,4 +51,4 @@ The Type Registry contains a map of custom types to their corresponding type con
51
51
The `TypeRegistry` allows for manually registering new type converters, giving you full control over how custom types are handled in your automations. You can also
52
52
access the registry directly if needed, which can allow you to convert between types without having to rewrite your type conversion logic.
53
53
54
-
You can read more about the Type Registry in the [Type Registry guide][pages/advanced/type-registry.md].
54
+
You can read more about the Type Registry in the [Type Registry guide](type-registry.md).
0 commit comments