Add has_state and has_command to hw_component_if
#2701
Merged
has_state and has_command to hw_component_if
#2701