@property
def state_with_unit(self) -> str:
    'Return the state concatenated with the unit if available.'
    self._collect_state()
    unit = self._state.attributes.get(ATTR_UNIT_OF_MEASUREMENT)
    return (f'{self._state.state} {unit}' if unit else self._state.state)
Return the state concatenated with the unit if available.
@property
def state_with_unit(self) -> str:
    
    self._collect_state()
    unit = self._state.attributes.get(ATTR_UNIT_OF_MEASUREMENT)
    return (f'{self._state.state} {unit}' if unit else self._state.state)