genestealer / Home-Assistant-Configuration

My Home Assistant Configuration - 🏡 Open-source home automation platform running on Python 3 https://home-assistant.io
MIT License
38 stars 15 forks source link

New to the whole idea of Home assistance #1

Closed thedamn316 closed 1 year ago

thedamn316 commented 2 years ago

I'm trying to run your code, but having an issue. Is this the way I'm suppose to modify the dell_idrac.yaml - platform: snmp host: 192.168.1.240 port: 161 community: public name: RawDellServerPower baseoid: 1.3.6.1.4.1.674.10892.5.4.600.30.1.6.1.3 unit_of_measurement: W

Inside my configuration.yaml

image

I'm getting this error when I did the above in Portainer logs of Home Assistance

022-02-03 02:58:31 ERROR (MainThread) [root] Uncaught exception Traceback (most recent call last): File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/usr/src/homeassistant/homeassistant/__main__.py", line 331, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 318, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 121, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete return future.result() File "/usr/src/homeassistant/homeassistant/runner.py", line 103, in setup_and_run_hass hass = await bootstrap.async_setup_hass(runtime_config) File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 120, in async_setup_hass config_dict = await conf_util.async_hass_config_yaml(hass) File "/usr/src/homeassistant/homeassistant/config.py", line 364, in async_hass_config_yaml await merge_packages_config(hass, config, core_config.get(CONF_PACKAGES, {})) File "/usr/src/homeassistant/homeassistant/config.py", line 723, in merge_packages_config PACKAGES_CONFIG_SCHEMA(packages) File "/usr/src/homeassistant/homeassistant/helpers/config_validation.py", line 509, in verify return cast(dict, schema(value)) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 272, in __call__ return self._compiled([], data) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict return base_validate(path, iteritems(data), out) File "/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: expected a dictionary for dictionary value @ data['sensor'] [finish] process exit code 1

genestealer commented 2 years ago

Sorry to hear it's not working, can you please try putting the dell_idrac.yaml into a subfolder structure /packages/dell_server/dell_idrac.yaml

Then change your package configuration.yaml to "packages: !include_dir_named packages/"

Like this: image image

Here is an example of how to modify the dell_idrac.yaml: image

thedamn316 commented 2 years ago

Great! no more errors regarding the dell_idrac.yaml, but sensors are not showing up image This my dell_idrac image image IDrac is enabled on my R720xd and able to pull information using Power SNMP Windows application

genestealer commented 2 years ago

Can you see the sensors created by the package in the developer tools states page?

Screenshot_20220212-172453

thedamn316 commented 1 year ago

Sorry for the very late response. I managed to get it to work long time ago, but I completely forgot to report. I have a new issue since I upgraded home assistant. I'm getting this error

Logger: homeassistant.config Source: config.py:888 First occurred: 8:48:11 PM (1 occurrences) Last logged: 8:48:11 PM

Invalid config for [sensor.integration]: The 'unit' option near /config/configuration.yaml:177 has been removed, please remove it from your configuration. Got OrderedDict([('platform', 'integration'), ('source', 'sensor.server_power'), ('name', 'Dell Server Energy'), ('unit_prefix', 'k'), ('unit_time', 'h'), ('round', 2), ('unit', 'kWh')]). (See /config/configuration.yaml, line 177). Please check the docs at https://www.home-assistant.io/integrations/integration

thedamn316 commented 1 year ago

Ignore my previous comment. I resolved it. Thanks