mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Note snake_case state attribute name convention in entity docs (#27287)
https://github.com/home-assistant/home-assistant/pull/26675#discussion_r331763063
This commit is contained in:
parent
f6b8cffeaf
commit
3adac699c7
@ -148,7 +148,8 @@ class Entity:
|
|||||||
def state_attributes(self) -> Optional[Dict[str, Any]]:
|
def state_attributes(self) -> Optional[Dict[str, Any]]:
|
||||||
"""Return the state attributes.
|
"""Return the state attributes.
|
||||||
|
|
||||||
Implemented by component base class.
|
Implemented by component base class. Convention for attribute names
|
||||||
|
is lowercase snake_case.
|
||||||
"""
|
"""
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@ -156,7 +157,8 @@ class Entity:
|
|||||||
def device_state_attributes(self) -> Optional[Dict[str, Any]]:
|
def device_state_attributes(self) -> Optional[Dict[str, Any]]:
|
||||||
"""Return device specific state attributes.
|
"""Return device specific state attributes.
|
||||||
|
|
||||||
Implemented by platform classes.
|
Implemented by platform classes. Convention for attribute names
|
||||||
|
is lowercase snake_case.
|
||||||
"""
|
"""
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user