mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-16 22:06:50 +00:00
fix get_state syntax examples (#6952)
when called as given, errors with `TypeError: get_state() takes from 1 to 2 positional arguments but 3 were given`
This commit is contained in:
parent
3e637cbf22
commit
c3e0770b2f
@ -317,10 +317,10 @@ state = self.get_state("switch")
|
|||||||
state = self.get_state("light.office_1")
|
state = self.get_state("light.office_1")
|
||||||
|
|
||||||
# Return the brightness attribute for light.office_1
|
# Return the brightness attribute for light.office_1
|
||||||
state = self.get_state("light.office_1", "brightness")
|
state = self.get_state("light.office_1", attribute = "brightness")
|
||||||
|
|
||||||
# Return the entire state for light.office_1
|
# Return the entire state for light.office_1
|
||||||
state = self.get_state("light.office_1", "all")
|
state = self.get_state("light.office_1", attribute = "all")
|
||||||
```
|
```
|
||||||
|
|
||||||
### {% linkable_title set_state() %}
|
### {% linkable_title set_state() %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user