-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect configuration #2
Comments
Architecture must be: configuration.yaml
Create the file bodymiscale.yaml in folder components In folder custom_components there is the download of hacs to know folder \translations You will even get an error but don't worry about it. Normally the bodymiscale.adrian and bodymiscale.wife should be present |
tried, but same errors in components/bodymiscale.yaml i have: adrian: in custom_components there is no init.py....is init.py |
so we have the same thing, but works differently |
Commenter #bodymiscale: !include components/bodymiscale.yaml in confirguration.yaml try in configuration.yaml
|
unfortunately same thing |
try name esphome name: Weight Adrian |
My component is created as even despite this error in my journal
|
Check as even if the bodymiscal device is created in the development tools |
Nice. Yes the error I cannot remove it. I am not a programmer. Complicate for me, I hope a qualified person will find out later. |
u created template sensors or use a custom card to display entity attributes?
https://www.swisstransfer.com/d/d86fbe7c-762a-43d9-815a-069689a17fa9 |
merci pour votre patience et votre gentillesse. J'espère qu'un programmeur résoudra les erreurs et sera une intégration réussie à 100% |
I tried to follow the instructions but maybe something is escaping my eyes
In configuration.yaml i put what you wrote : bodymiscale: !include components/bodymiscale.yaml - that is invalid for a instalation through HACS. I modified to bodymiscale: !include custom_components/bodymiscale.yaml - which was accepted by HA.
I put directly into custom_components file bodymiscale.yaml in which i put the required data:
adrian:
sensors:
weight: sensor.adrian_w
impedance: sensor.adrian_i
height: 1xx
born: "xxxxx"
gender: "male"
model_miscale: "181B"
wife:
sensors:
weight: sensor.wife_w
impedance: sensor.wife_i
height: 1xx
born: "xxxxxx"
gender: "female"
model_miscale: "181B"
After restart i have the following errors:
The following integrations and platforms could not be set up:
Please check your config and logs.
Logger: homeassistant.setup
Source: custom_components/bodymiscale/init.py:280
First occurred: 11:30:32 PM (1 occurrences)
Last logged: 11:30:32 PM
Error during setup of component bodymiscale
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 213, in _async_setup_component
result = await task
File "/config/custom_components/bodymiscale/init.py", line 114, in async_setup
await component.async_add_entities(entities)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 315, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 506, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 531, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 322, in _async_write_ha_state
attr.update(self.state_attributes or {})
File "/config/custom_components/bodymiscale/init.py", line 280, in state_attributes
ATTR_WEIGHT: "{:.2f} kg".format(weight),
TypeError: unsupported format string passed to NoneType.format
Logger: homeassistant.helpers.event
Source: custom_components/bodymiscale/init.py:228
First occurred: 11:30:41 PM (5 occurrences)
Last logged: 11:30:43 PM
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 257, in _async_state_change_dispatcher
hass.async_run_hass_job(job, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 435, in async_run_hass_job
hassjob.target(*args)
File "/config/custom_components/bodymiscale/init.py", line 168, in _state_changed_event
self.state_changed(event.data.get("entity_id"), event.data.get("new_state"))
File "/config/custom_components/bodymiscale/init.py", line 191, in state_changed
self._update_state()
File "/config/custom_components/bodymiscale/init.py", line 204, in _update_state
result.append(self._check_max(sensor_name, value, params))
File "/config/custom_components/bodymiscale/init.py", line 228, in _check_max
if value > max_value:
TypeError: '>' not supported between instances of 'str' and 'float'
The text was updated successfully, but these errors were encountered: