Common scenario is when a template switch loads before the platform it is attempting to retrieve the state of for its template. This results in a spam of messages in the error log about invalid states if using the states object directly in the template. Added a note to the documentation about this situation as well as updated the examples to use is_state instead of the states object and avoid this issue for people referencing these examples.